[Mimedefang] Bouncing on invalid HELO/EHLO

Jim McCullars jim at info.uah.edu
Thu Jun 12 16:31:59 EDT 2003


On Thu, 12 Jun 2003, Jim McCullars wrote:

> > 2 subnets 204.182.112.64/27 and 64.38.151.160/27  (32 ip range)
>
>    I think this should work:
>
> sub filter_relay {
>   my($ip, $name, $helo) = @_;
>   return(1, "OK") if($ip =~/^204\.182\.112\.(?:6[4-9]|7\d|8\d|9[0-5])$/);
>   return(1, "OK") if($ip =~/^64\.38\.151\.(?:16\d|17\d|18\d|19[0-1])$/);

  I just saw another reply to this problem and realized I left out
localhost.  If you go with the above, add this:

    return(1, "OK") if ($ip eq "127.0.0.1");

Jim





More information about the MIMEDefang mailing list