[Mimedefang] MIMEDefang 2.43 is released

Rich West Rich.West at wesmo.com
Tue May 11 11:49:38 EDT 2004


Dumb question, but where, now, is the HELO argument accessible?

With this change, my filter_relay will no longer function... what would 
be the recommended alternative?

sub filter_relay () {
   my($hostip, $hostname, $helo) = @_;

   # Can't be "wesmo.com" unless it's one of our IP's.
   if ($helo =~ /(^|.)mydomain\.com$/i)
   {
      if ($hostip ne "127.0.0.1" and $hostip ne "$myserverIP")
      {
         syslog('info', "Host $hostip said HELO $helo");
         return(0, "Go away. $hostip is not a mydomain.com machine");
      }
   }
   # The hostname better match the helo string.
   if (($helo =~ /^(\d{1,3})(.)(\d{1,3})(.)(\d{1,3})(.)(\d{1,3})$/) && 
($hostip ne $helo))
   {
      syslog('info', "Host $hostip claims to be $helo");
      return (0, "Header forgery attempt, $ip claims to be $helo")
   }
   return (1, "OK");
}

Thanks!
-Rich

>	* mimedefang.pl.in: If resending a message fails during streaming,
>	we bounce the message and log an error at LOG_CRIT importance.
>
>	* Modified C and Perl code so that filter_relay is called
>	when remote client connects rather than after MAIL FROM.
>	This means the $helo argument is NOT available!
>
>	   *** NOTE INCOMPATIBILITY ***
>
>	filter_relay no longer has access to the HELO argument, nor
>	does the MIMEDefang spool directory exist when filter_relay is called.
>



More information about the MIMEDefang mailing list