[Mimedefang] DNSWL

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Tue Oct 30 10:01:45 EDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 30 Oct 2012, Tilman Schmidt wrote:

something like this - untested

>    # Spam checks if SpamAssassin is installed

      my $dnswl;

>    if ($Features{"SpamAssassin"}) {
>        if ($RelayAddr =~ /^10\.0\./) {
>            # Don't scan messages from local net
>            md_graphdefang_log('locl');
>        }
>        elsif (defined($SendmailMacros{"auth_type"})) {
>            # Don't scan messages from authenticated senders.
>            md_graphdefang_log('auth');
>        }
         elsif(defined($dnswl = relay_is_blacklisted($RelayAddr, 'list.dnswl.org')) && $dnswl =~ /\A127\.\0\.\d+\.[23]\z/) {
             # Don't scan messages when whitelisted in DNSWL
             md_graphdefang_log('dnswl ' . $dnswl);
         }
>        elsif (-s "./INPUTMSG" < 100*1024) {
>            # Only scan messages smaller than 100kB.
>            my($hits, $req, $names, $report) = spam_assassin_check();
>            if ($hits >= $req) {
>                ...yadda...
>            }
>        }
>    }
>
> I would like to extend that so that the SpamAssassin call is
> skipped for hosts which are ranked medium or high on the DNSWL,
> as recommended on http://www.dnswl.org/tech. Alas, that page
> does not offer a MIMEDefang recipe.
>
> Google found a discussion on this list in December 2007 under
> the subject "dnswl and relay_is_blacklisted() in Mimedefang
> sub_filter_relay" that appears relevant, but I'm not sure how
> to apply that to my case.
>
> Could someone share a code snippet?
>

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBUI/dyv41+pMevzVSAQKZWwf+MLLdHZ0+tfB3qt3YAIiGym21/G315LB5
rsU0LMBRp53N4PaXZCDw10+pI/RlEN+bRg5jg+J/SL1ov8pd7b/m66/VjeZ+Jttq
f1ODDybscORDoityJgnL80Pp8wTqRY8JmtwUdtM7wV5nRDPPIospO0nHgqdjVBAi
0THBQGcXE1vITq283a2wSQA7FTag4xyu9ZXgL9YCUFoisVGwPjs/AcyterUb71nG
8VCQI7nw88cGGRcUoSvLJb71mDZ+/wQxw/4uQLalp+2zfMscDyotLUfH+III42cG
oLTF9xvNMvOOXcGfaVBsBn3K2X5s7CLnED3BoFF7VIM1jdg6eaqUnQ==
=kpUK
-----END PGP SIGNATURE-----



More information about the MIMEDefang mailing list