[Mimedefang] Bouncing on invalid HELO/EHLO

Edgars Klepers mimedefanglist at eklynx.com
Thu Jun 12 11:47:01 EDT 2003


This might just be a stupid question based the fact that my brain doesn't
turn on before noon, but does this also reject machines with the domain the
same but the hostmask different? 

Exampe.

Server is known as linux.domain.com, mail.domain.com, and domain.com.
Machines on the network are machine1.domain.com, machine2, etc....
Will it reject the machines because they share the domain.com?

-----Original Message-----
From: mimedefang-admin at lists.roaringpenguin.com
[mailto:mimedefang-admin at lists.roaringpenguin.com] On Behalf Of Geoff
Thornton
Sent: Thursday, June 12, 2003 7:53 AM
To: 'mimedefang at lists.roaringpenguin.com'
Subject: RE: [Mimedefang] Bouncing on invalid HELO/EHLO


I bounce messages if someone claims to be my domain/ip address and is not.
Here's the filter code I use...

sub filter_sender {
    my ($sender, $ip, $name, $helo) = @_;
    md_syslog('info', "$MsgID: HELO $helo, MAIL FROM: $sender, relay=$name
\[$ip\]");
 
    if ($ip =~ /127\.0\.0\.1/) { return ('CONTINUE', "ok"); }
    if ($ip =~ /###\.###\.###\.###/) { return ('CONTINUE', "ok"); }
    if ($helo =~ /###\.###\.###\.###/) { return ('REJECT', "$name \[$ip\] is
not $helo"); } 
    if ($helo =~ /.+\.?###########\.com/) { return ('REJECT', "$name \[$ip\]
is not $helo"); }
    return ('CONTINUE', "ok");
}

The first set of hash marks is the IP address of my internal mail server.
The second set of hash marks is the IP address of the MIMEDefang server. The
third set of hash marks is the home domain configured for sendmail (i.e. the
$j value).  So far I have not had a single false positive.


--Geoff Thornton





More information about the MIMEDefang mailing list