<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- src/dbaccess.c.orig	2009-02-22 23:27:00.000000000 +0400
+++ src/dbaccess.c	2014-07-11 15:13:43.122741657 +0400
@@ -216,14 +216,19 @@
   char **entry;
   char **retbuf;
   int i;
+  time_t seconds;
+  char days[sizeof(seconds)];
   
   maxwait.tv_sec=LDAPQUERY_MAXWAIT;
   maxwait.tv_usec=0;
+  seconds = time(NULL);
   
   
   cpyStr(&amp;tmp,cfg.qfilter);
   expandVars(&amp;tmp,cfg.map_receiver,(char*)mail);
   expandVars(&amp;tmp,cfg.map_sender,sender);  
+  sprintf(days, "%d", seconds/(60*60*24));
+  expandVars(&amp;tmp,"$time", days);
   
   i=ldap_search_st(ldcon,cfg.base,cfg.scope,tmp,cfg.macro_attr,0,&amp;maxwait,&amp;res);
   if (i!=LDAP_SUCCESS) {
</pre></body></html>