Bug in Local Domains

Sandor Dobos dobos_s at IBCNET.HU
Thu Jan 31 13:54:39 GMT 2002


Thanks, It seems You have more perl knowledge than I have :-)))

I forget something: You should write all the input files (localdomains,
spamwhitelist)
in lower case, or add "lc" to appropriate lines in config.pl too.

Dobos Sandor
IBCnet Hungary Ltd.






                    Julian Field
                    <jkf at ECS.SOTON.AC.        To:     MAILSCANNER at JISCMAIL.AC.UK
                    UK>                       cc:
                    Sent by:                  Subject:     Re: Bug in Local Domains
                    MailScanner
                    mailing list
                    <MAILSCANNER at JISCM
                    AIL.AC.UK>


                    2002.01.31 12:33
                    Please respond to
                    MailScanner
                    mailing list





At 11:00 31/01/2002, you wrote:
>The from/to addresses are case insensetive in SMTP protokoll, but
>mailscanner uses it in case sensitive way.
>For example if You send a mail from Your ABC.com domain, and in Local
>Domains file is only abc.com, then
>if Your mail is disinfected it will be sent to outer recipients in spite
of
>You set not to deliver from local addresses!
>
>The same case-sensitivity problem exists with spam white list.

Here's a rather briefer change that achieves much the same thing:
Just two lines to add.

*** sendmail.pl Wed Jan 30 14:00:13 2002
--- sendmail.pl.new     Thu Jan 31 11:28:32 2002
***************
*** 170,175 ****
--- 170,176 ----
       next if $SkipChecks;

       # Check to ensure the sender address isn't in the white list
+     $from = lc($from);
       $from =~ s/^<//; # Delete leading and
       $from =~ s/>$//; # trailing <>
       $fromdomain = $from;

*** disinfect.pl        Thu Dec 13 12:37:30 2001
--- disinfect.pl.new    Thu Jan 31 11:28:58 2002
***************
*** 98,103 ****
--- 98,104 ----
       # Don't do this if we aren't delivering cleaned up mail and the
message
       # came from one of the local domains.
       $from = (split(/\0/, $MessagesInfo->{$id}))[0];
+     $from = lc($from);
       $from =~ s/^<//; # Delete leading and
       $from =~ s/>$//; # trailing <>
       $fromdomain = $from;

--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list