[Mimedefang] Small syntax question

Joseph Brennan brennan at columbia.edu
Mon Dec 11 15:51:24 EST 2006



--On Monday, December 11, 2006 20:16 +0000 Paul Murphy 
<Paul.Murphy at argentadiscovery.com> wrote:

>
>#     return if ($SendmailMacros{daemon_name}) = "MSA";
>
> You can't use arithmetic comparison on a string value: use "eq" instead:
>
>      return if ($SendmailMacros{daemon_name}) eq "MSA";

Watch the parentheses too.  Should be:

      return if ($SendmailMacros{daemon_name} eq "MSA");



> Also, there are Sendmail "auth" macros which are a more reliable method
> of determining who connected and how - they will give you a username,
> rather than this approach, which only shows that the sender was on an
> internal connection.

Right, just check for smtp auth:

      return if (defined($SendmailMacros{"auth_type"}));

The above does not check what the value of auth_type is, but if it has
any value, the sender did smtp auth successfully.  If you have sendmail
configured to disallow smtp auth at 25 and require smtp auth at 587 and
465, then it's the same thing as what you had.

(We're willing to take smtp auth at port 25 too.  So many clients
still default to 25 that it was the path of less resistance.)

Joseph Brennan
Lead Email Systems Engineer
Columbia University Information Technology




More information about the MIMEDefang mailing list