Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

Patch to add non-debug logging of expired greylist entries

Patch to add non-debug logging of expired greylist entries

2006-02-15 by Jeff Rife

If you set "debug", then one of the things that gets logged is expired 
greylist entries.  These are useful to know about machines that didn't 
retry, so they can be used for later blacklisting (through ACL in this 
program, or access.db) or for any other purpose.  

Here is a diff against version 2.1.3 that adds the "logexpired" config 
option and implements it in the code and man page.  If it is in the wrong 
format, let me know how you need it and I'll do it.

======================================================================
diff milter-greylist-2.1.3.new/conf.h milter-greylist-2.1.3/conf.h
97d96
<       int c_logexpired;
diff milter-greylist-2.1.3.new/conf_lex.l milter-greylist-2.1.3/conf_lex.l
60d59
< logexpired    [Ll][Oo][Gg][Ee][Xx][Pp][Ii][Rr][Ee][Dd]
106d104
< {logexpired}  { return LOGEXPIRED; }
diff milter-greylist-2.1.3.new/conf_yacc.y milter-greylist-2.1.3/conf_yacc.y
1c1
< %token TNUMBER ADDR IPADDR IP6ADDR CIDR FROM RCPT EMAIL PEER AUTOWHITE GREYLIST NOAUTH NOACCESSDB EXTENDEDREGEX NOSPF QUIET TESTMODE VERBOSE PIDFILE GLDUMPFILE PATH TDELAY SUBNETMATCH SUBNETMATCH6 SOCKET USER NODETACH REGEX REPORT NONE DELAYS NODELAYS ALL LAZYAW GLDUMPFREQ GLTIMEOUT DOMAIN DOMAINNAME SYNCADDR SYNCSRCADDR PORT ACL WHITELIST DEFAULT STAR DELAYEDREJECT DB NODRAC DRAC DUMP_NO_TIME_TRANSLATION LOGEXPIRED
---
> %token TNUMBER ADDR IPADDR IP6ADDR CIDR FROM RCPT EMAIL PEER AUTOWHITE GREYLIST NOAUTH NOACCESSDB EXTENDEDREGEX NOSPF QUIET TESTMODE VERBOSE PIDFILE GLDUMPFILE PATH TDELAY SUBNETMATCH SUBNETMATCH6 SOCKET USER NODETACH REGEX REPORT NONE DELAYS NODELAYS ALL LAZYAW GLDUMPFREQ GLTIMEOUT DOMAIN DOMAINNAME SYNCADDR SYNCSRCADDR PORT ACL WHITELIST DEFAULT STAR DELAYEDREJECT DB NODRAC DRAC DUMP_NO_TIME_TRANSLATION
92d91
<       |       lines logexpired '\n'
219,220d217
<
< logexpired:   LOGEXPIRED { conf.c_logexpired = 1; }
diff milter-greylist-2.1.3.new/greylist.conf milter-greylist-2.1.3/greylist.conf
98,102d97
< # This option causes greylist entries that expire to be logged via
< # syslog.  This allows you to collect the IP addresses and sender
< # names and use them for blacklisting, SPAM scoring, etc.
< #logexpired
<
diff milter-greylist-2.1.3.new/greylist.conf.5 milter-greylist-2.1.3/greylist.conf.5
453,460d452
< .TP
< .I logexpired
< This option causes greylist entries that expire to be logged via syslog.
< This allows you to easily collect the IP addresses and sender names and
< use them for blacklisting, SPAM scoring, etc.  Normally, expirations are
< only logged if the
< .B debug
< option is set, but that generates a lot of extra messages.
diff milter-greylist-2.1.3.new/pending.c milter-greylist-2.1.3/pending.c
240c240
<                       if (conf.c_debug || conf.c_logexpired) {
---
>                       if (conf.c_debug) {

======================================================================


--
Jeff Rife | "She just dropped by to remind me that my life 
          |  is an endless purgatory, interrupted by profound 
          |  moments of misery." 
          |         -- Richard Karinsky, "Caroline in the City"

Re: [milter-greylist] Patch to add non-debug logging of expired greylist entries

2006-02-17 by manu@netbsd.org

Jeff Rife <yahoo@...> wrote:

> Here is a diff against version 2.1.3 that adds the "logexpired" config
> option and implements it in the code and man page.  If it is in the wrong
> format, let me know how you need it and I'll do it.

Integrated.

Next time, please post the output of diff -U4 old_file new_file, and if
you have to copy/paste the patch in the e-mail, make sure your software
does not turn tabs into spaces.


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.