FromTo: not working?
Jan-Peter Koopmann
Jan-Peter.Koopmann at SECEIDOS.DE
Mon Mar 10 11:30:10 GMT 2003
Hi Julian,
> I have just tested your exact rules file, totally untouched,
> with messages coming from seceidos.de and messages not coming
> from there. It worked 100% as I would have expected it to
> work, so it's not a bug.
I took the liberty to debug this and I think I found the problem. In
Config.pm I put
MailScanner::Log::WarnLog("Matching From: " . $msg->{from} ."\n");
foreach $to (@{$msg->{to}}) {
MailScanner::Log::WarnLog("Matching To: " . $to ."\n");
}
MailScanner::Log::WarnLog("Matching against $direction $iporaddr
/$regexp/\n");
In the foreach $rule part of the sub Value. This is what the log says
when I write a message:
Mar 10 12:26:21 proxy MailScanner[66706]: Matching From:
<jan-peter.koopmann at seceidos.de>
Mar 10 12:26:21 proxy MailScanner[66706]: Matching To:
jan-peter.koopmann at web.de
Mar 10 12:26:21 proxy MailScanner[66706]: Matching against ft t
/^.*\@seceidos\.de\.?$/
Mar 10 12:26:21 proxy MailScanner[66706]: Matching From:
<jan-peter.koopmann at seceidos.de>
Mar 10 12:26:21 proxy MailScanner[66706]: Matching To:
jan-peter.koopmann at web.de
Mar 10 12:26:21 proxy MailScanner[66706]: Matching against ft t
/^.*\@seceidos\.net\.?$/
Mar 10 12:26:21 proxy MailScanner[66706]: Matching From:
<jan-peter.koopmann at seceidos.de>
Mar 10 12:26:21 proxy MailScanner[66706]: Matching To:
jan-peter.koopmann at web.de
Mar 10 12:26:21 proxy MailScanner[66706]: Matching against ft t
/^.*\@seceidos\.org\.?$/
Mar 10 12:26:21 proxy MailScanner[66706]: Matching From:
<jan-peter.koopmann at seceidos.de>
Mar 10 12:26:21 proxy MailScanner[66706]: Matching To:
jan-peter.koopmann at web.de
Mar 10 12:26:21 proxy MailScanner[66706]: Matching against ft t
/^.*\@seceidos\.com\.?$/
Mar 10 12:26:21 proxy MailScanner[66706]: Matching From:
<jan-peter.koopmann at seceidos.de>
Mar 10 12:26:21 proxy MailScanner[66706]: Matching To:
jan-peter.koopmann at web.de
Mar 10 12:26:21 proxy MailScanner[66706]: Matching against ft t
/^.*\@telefonia\.de\.?$/
Mar 10 12:26:21 proxy MailScanner[66706]: Matching From:
<jan-peter.koopmann at seceidos.de>
Mar 10 12:26:21 proxy MailScanner[66706]: Matching To:
jan-peter.koopmann at web.de
Mar 10 12:26:21 proxy MailScanner[66706]: Matching against ft t
/^.*\@akctech\.de\.?$/
I was quite surprised to see that $msg->(from) included the '<' and '>'.
The call
$misses++ unless $msg->{from} =~ /$regexp/i;
This does not match due to the trailing '>'. Is it possible that the
Sendmail.pm gives you the {from} without '<' and '>' yet the Exim.pm
does? Moreover, the {to} part does not have these and therefore the To:
part of the rule works.
Regards,
JP
More information about the MailScanner
mailing list