SpamCheck report
Pascal Maes
pascal.maes at elec.ucl.ac.be
Sun May 27 19:26:56 IST 2007
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
More information about the MailScanner
mailing list