SpamCheck report

Jason Ede j.ede at birchenallhowden.co.uk
Mon May 28 08:13:13 IST 2007


Hmmm.... Simple, but neat :-)
 
Can you use a custom function and a ruleset at the same time? i.e. using the authenticated header check along with an ordinary ruleset containing a list of whitelisted addresses?
 
Jason

________________________________

From: mailscanner-bounces at lists.mailscanner.info on behalf of Pascal Maes
Sent: Sun 27/05/2007 19:26
To: MailScanner discussion
Subject: Re: SpamCheck report




Le 27 mai 07 à 15:51, Jason Ede a écrit :

> Hi,
>
> I don't suppose you'd be willing to share that custom function? We'd
> like to do the same, but the only way I can see to do that so far 
> is to
> have postfix include the SASL login username in the header which I'm
> loathe to do if I can really avoid it.
>
> Jason


Why not ?
The first idea comes from the list so I could post it again.
But first, thanks to Julian for his quick answer.

------8<------8<------8<------8<------8<------8<------8<------8<------8<
------8<------

package MailScanner::CustomConfig;

use strict 'vars';
use strict 'refs';
no  strict 'subs'; # Allow bare words for parameter %'s

use vars qw($VERSION);

### The package version, both in 1.23 style *and* usable by MakeMaker:
$VERSION = substr q$Revision: 2331 $, 10;

sub InitCheckSMTPAuth
{
    # Empty
}

sub EndCheckSMTPAuth
{
    # Empty
}

sub CheckSMTPAuth
{
    my ($message) = @_;
    return 1 unless $message;

    foreach (@{$message->{headers}})
    {
         if (/PUT HERE THE STRING ABOUT THE AUTHENTICATION/)
         {
             MailScanner::Log::InfoLog("Message %s from (%s) is 
authenticated ($1)", $message->{id}, $message->{
fromuser});
             $global::MS->{mta}->AddHeader($message, 'X-MailScanner-
Spamcheck:', 'Authenticated');
             return 0;
         }
     }
     return 1;
}

1;

------8<------8<------8<------8<------8<------8<------8<------8<------8<
------8<------


--
Pascal

--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!



-----------------------------------------------------------
The information in this e-mail and any attachments is confidential. It is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or person responsible for delivering this information to the intended recipient, please notify the sender or email postmaster at birchenallhowden.co.uk and delete it from your computer systems. Unless you are the intended recipient or his/her representative you are not authorised to, and must not, read, copy, distribute, use or retain this message or any part of it. All messages are scanned by Mailscanner and are believed to be clean. Recipients are advised to apply their own virus checks to any message on delivery. No liability is accepted by BirchenallHowden Ltd for any losses caused by viruses contracted during transit over the internet or present in any receiving system. BirchenallHowden Ltd, 233 Edmund Road, Sheffield, S2 4EL


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070528/c7d2de11/attachment.html


More information about the MailScanner mailing list