Change 77
Change 77 by nullbyte@nullbyte-gentoo on 2004/06/30 21:15:44
greylistd 0.3: syslog, prereqs, docs. running on ttul for 4 months, zero complaints
(except from spammers, presumably)
Affected files ...| //depot/projects/greylistd/lib/Mail/Greylist.pm#4 | ktext | |
| //depot/projects/greylistd/bin/greylistd#3 | xtext | |
| //depot/projects/greylistd/Makefile.PL#2 | text | |
| //depot/projects/greylistd/README#2 | text | |
| //depot/projects/greylistd/Changes#3 | text |
==== //depot/projects/greylistd/lib/Mail/Greylist.pm#4 (ktext) ====
| @@ -11,7 +11,7 @@ | ||
| 11 | 11 | use DB_File; |
| 12 | 12 | use Fcntl; |
| 13 | 13 | |
| 14 | our $VERSION = '0.2'; | |
| 14 | our $VERSION = '0.3'; | |
| 15 | 15 | |
| 16 | 16 | my $DELAY = 300; # seconds a new triplet must wait |
| 17 | 17 | my $LIFETIME = 36 * 86400; # forget triplets after this long |
==== //depot/projects/greylistd/bin/greylistd#3 (xtext) ====
| @@ -10,11 +10,13 @@ | ||
| 10 | 10 | use lib '/usr/local/lib/greylistd'; |
| 11 | 11 | use Mail::Greylist; |
| 12 | 12 | use Getopt::Std; |
| 13 | use Sys::Syslog qw(:standard); | |
| 13 | 14 | |
| 14 | 15 | my %opt; |
| 15 | 16 | getopts('d:f:', \%opt) or die "usage: greylistd [-d delay] [-f dbfile]\n"; |
| 16 | 17 | |
| 17 | 18 | $| = 1; |
| 19 | openlog('greylistd', 'pid', 'mail'); | |
| 18 | 20 | my $gl = Mail::Greylist->new(delay => $opt{d}, dbfile => $opt{f}); |
| 19 | 21 | my %req; |
| 20 | 22 | |
| @@ -22,6 +24,8 @@ | ||
| 22 | 24 | chomp $line; |
| 23 | 25 | if ($line eq '') { |
| 24 | 26 | my $action = $gl->check(%req); |
| 27 | syslog('info', '%s from=<%s> to=<%s>: %s', $req{client_address} || '?', | |
| 28 | $req{sender} || '', $req{recipient} || '', $action); | |
| 25 | 29 | print "action=$action\n\n"; |
| 26 | 30 | %req = (); |
| 27 | 31 | next; |
==== //depot/projects/greylistd/Makefile.PL#2 (text) ====
| @@ -6,7 +6,9 @@ | ||
| 6 | 6 | VERSION_FROM => 'lib/Mail/Greylist.pm', |
| 7 | 7 | EXE_FILES => [ 'bin/greylistd' ], |
| 8 | 8 | PREREQ_PM => { |
| 9 | 'DB_File' => 0, | |
| 9 | 'DB_File' => 0, | |
| 10 | 'Sys::Syslog' => 0, | |
| 11 | 'Test::More' => 0, | |
| 10 | 12 | }, |
| 11 | 13 | ABSTRACT => 'SMTP greylisting policy daemon for Postfix', |
| 12 | 14 | AUTHOR => 'nullbyte <nullbyte@ttul.org>', |
==== //depot/projects/greylistd/README#2 (text) ====
| @@ -30,6 +30,13 @@ | ||
| 30 | 30 | |
| 31 | 31 | Reload postfix and watch the maillog. |
| 32 | 32 | |
| 33 | OPTIONS | |
| 34 | ||
| 35 | -d SECS how long a new triplet must wait (default 300) | |
| 36 | -f FILE triplet database (default /var/lib/greylistd/triplets.db) | |
| 37 | ||
| 38 | Every decision is logged to syslog, facility mail. | |
| 39 | ||
| 33 | 40 | BUGS |
| 34 | 41 | |
| 35 | 42 | Probably. Mail nullbyte@ttul.org, or file a job in p4. |
==== //depot/projects/greylistd/Changes#3 (text) ====
| @@ -1,5 +1,10 @@ | ||
| 1 | 1 | Revision history for Mail::Greylist |
| 2 | 2 | |
| 3 | 0.3 Wed Jun 30 2004 | |
| 4 | - log every decision via syslog | |
| 5 | - Makefile.PL lists all prereqs | |
| 6 | - README: options | |
| 7 | ||
| 3 | 8 | 0.2 Sun Apr 11 2004 |
| 4 | 9 | - key triplets on the client /24, not the full IP (job000004). |
| 5 | 10 | hotmail's outbound farm was never getting through. |