On 17/12/2003 18:44, Ricki wrote: > I was wondering, Is there a was to prevent spamassassin from scanning > mail from a particular IP address ?
I use a perl script to check for a specific received line in each mail, if it is there, it is a local mail and should not be scanned. This is the script, courtesy of Sebastian Breier: *** START PERL SCRIPT #!D:/Perl/bin/perl.exe use strict; open(MAIL, '<' . $ARGV[0]); my @mail = <MAIL>; close(MAIL); my $result = grep(/Received: .+ \((192\.168\.1\..+|127\.0\.0\.1)\) by servername\.domain\.name \(Mercury\/32 v4\.01a\)/, @mail); my $exitvalue = 0; if (!$result) { # Special Received line not found, so mail is non-local (check for spam) `Call D:\\perl\\bin\\spamassassin.bat -D -e < $ARGV[0] > $ARGV[1]`; $exitvalue = ($? >> 8); } if (!$exitvalue) { $exitvalue = 0; } exit($exitvalue); *** END PERL SCRIPT I call this from my mail server and it does the rest. HTH, -- Regards Barry ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk