Group :: System/Servers
RPM: greylistd
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: greylistd.patch
Download
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: