Urban, That is EXACTLY what I was looking for! Thank you so much for posting this modification!!! To be sure I insert the code in the correct position, could you send over either last original .pm line before or after your code? Again, thanks very much.
Joe -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Urban Loesch Sent: Tuesday, March 02, 2010 8:48 AM To: [email protected] Subject: Re: [policyd-users] Selective Greylisting Hi, I'm using version 2.0.5 at the moment and I changed the source code in file "Greylisting.pm" to do some selective greylisting. On my installation the greylisting is globally enabled and will be skipped, if the reverse dns entry (ptr) does not match a defined regular expression. Additionally it checks if the rev. dns and the EHLO/HELO are the same. Here comes the code; file: Greylisting.pm (ROW ~81) ... # MY STUFF - Begin if (($sessionData->{'ClientReverseName'} !~ m/(dynamic|dsl|\.cable\.|PUT|YOUR|REGEXP|HERE$)/) && $sessionData->{'ClientReverseName'} eq $sessionData->{'ClientName'})) { $server->maillog("module=Greylisting, action=pass, host=%s, hostname=%s, helo=%s, ptr=%s, from=%s, to=%s, reason=Skip Greylisting", $sessionData->{'ClientAddress'}, $sessionData->{'ClientName'}, $sessionData->{'Helo'}, $sessionData->{'ClientReverseName'}, $sessionData->{'Sender'}, $sessionData->{'Recipient'}); return CBP_SKIP; } # MY STUFF - End ... } Perhaps this isn't the perfect way to do it, but it works fine for me. Regards Urban Nathan Lager wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > There's a plugin for SpamAssassin which does this. I know it's not > Policyd related exactly, but it might be worth looking at, if you're > using SpamAssassin. > > I belive it was simply called "BotNet". As its intention was to help > make botnet's useless. > > Be wary though. I implemented this plugin in a large qmail > implementation I managed for a web host. It did an excellent job, but > there were a few cases where false positives caused issues. I had to > remove it to keep customers happy. > > Again, this is all useless if you're not using SpamAssassin. > > > > On 03/01/2010 11:25 AM, Joseph A. Lanager wrote: >> What I'm referring to would be to only apply greylisting to certain sites. >> For example, if a reverse DNS didn't resolve or contained a keyword such a >> "dynamic" or dialup. >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Simon Hobson >> Sent: Monday, March 01, 2010 11:22 AM >> To: [email protected] >> Subject: Re: [policyd-users] Selective Greylisting >> >> Joseph A. Lanager wrote: >>> Does Policyd support selective greylisting? If so, would anyone >>> know a good link for documentation on that feature? >> You can configure different greylisting options for different >> policies - so if you define multiple policies, you can have some of >> them greylisted, and others not. >> > > - -- > - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Nathan Lager > System Administrator > 11 Pardee Hall > Lafayette College, Easton, PA 18042 > 610-330-5907 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkuL7Q4ACgkQsZqG4IN3sunJ7QCgnaYUMikf6jSGLgI0ugwKQZpr > LVMAn2dUAaOp83YJOqBSmcSXOVrebwvT > =s+mr > -----END PGP SIGNATURE----- > _______________________________________________ > Users mailing list > [email protected] > http://lists.policyd.org/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users
