Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#330 AMAVIS::MTA::Maildrop "to" and "from" are case-sensitive

open
None
5
2005-01-06
2003-12-14
Bill Taroli
No

When getting one of the more common Microsoft
spam/virus messages, The "from" and "to" headers were
in ALL CAPS. This caused AMAVIS::MTA::Maildrop to be
unable to identify the senders and recipients for
processing. When the AV software reported back this had
a virus in it, the message gets re-queued due the
following in the syslog:

Can't use an undefined value as an ARRAY reference at
/usr/local/lib/perl5/site_perl/5.8.0/AMAVIS.pm line 561.

After some reading and comparing the code against the
problem emails, I found that the issue was caused by
the following in Maildrop.pm:

if (/^From: *(.*)$/) {
$$args{'sender'}=$1;
writelog($args,LOG_DEBUG,__PACKAGE__.": Sender
is $$args{'sender'}");
}
if (/^To: *(.*)$/) {
@{$$args{'recipients'}}=split /\s*,\s*/,$1;
writelog($args,LOG_DEBUG,__PACKAGE__.":
Recipients are "
.join(', ',@{$$args{'recipients'}}));
}

I modified my local copy to support case-insensitivity
as follows, and it resolved the issue.

if (/^[fF][rR][oO][mM]: *(.*)$/) {
$$args{'sender'}=$1;
writelog($args,LOG_DEBUG,__PACKAGE__.": Sender
is $$args{'sender'}");
}
if (/^[tT][oO]: *(.*)$/) {
@{$$args{'recipients'}}=split /\s*,\s*/,$1;
writelog($args,LOG_DEBUG,__PACKAGE__.":
Recipients are "
.join(', ',@{$$args{'recipients'}}));
}

Please consider this, or similarly functioning, fix for
subsequent releases.

Discussion

  • Bill Taroli
    Bill Taroli
    2003-12-14

    Logged In: YES
    user_id=931001

    oops! should have noted that this was found in amavis-ng, 0.1.6

     
  • Lars Hecking
    Lars Hecking
    2004-01-09

    • assigned_to: nobody --> bengen
     
  • Hilko Bengen
    Hilko Bengen
    2005-01-06

    • assigned_to: bengen --> braeucup