Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37494080
en ru br
ALT Linux repos
5.0: 0.8.7-alt1
4.1: 0.8.5-alt1.1
4.0: 0.8.3.4-alt1

Group :: System/Servers
RPM: greylistd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: greylistd.patch
Download


--- greylistd-0.8.3/program/greylistd.orig	2005-12-22 14:58:28 +0200
+++ greylistd-0.8.3/program/greylistd	2005-12-22 17:41:31 +0200
@@ -30,7 +30,7 @@
 
 from time         import time, ctime, localtime, strftime
 from socket       import socket, AF_UNIX, SOCK_STREAM, error as SocketError, gethostname
-from os           import remove, rename, chmod, chown, getuid, getpid, isatty
+from os           import remove, rename, chmod, chown, getuid, getpid, isatty, popen
 from pwd          import getpwnam
 from grp          import getgrnam
 from os.path      import join, exists
@@ -40,6 +40,7 @@
 from select       import select
 from inspect      import getargspec
 
+import string
 
 ### Ensure that we can run this program
 if PyVersion < "2.3":
@@ -117,7 +118,14 @@
         for (dataKey, dataValue) in data[listKey].items():
             if dataValue[IDX_LAST] + config[TIMEOUTS][timeoutKey] < now:
                 del data[listKey][dataKey]
-
+                if str(dataKey).startswith("-"):
+		    whatfind = "\\\\" + str(dataKey)
+		else:
+		    whatfind = str(dataKey)
+                cmd = "grep %s %s"%(whatfind,config[DATA][TRIPLETFILE])
+                for string in popen(cmd).readlines():
+		    (expkey, expvalue) = string.split(" = ", 1)
+		    log("Expired from %s: %s"%(listKey,expvalue), LOG_NOTICE)    
 
 def listStatus (searchkey):
     for listkey in datatypes:
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin