On Tue, Feb 10, 2009 at 10:54:45AM -0500, Joseph Brennan wrote:
> "Robert T. Covell" <rcov...@rolet.com> wrote:
> 
>> We have two sendmail processes running that will utilize the same MD
>> filter.
>> One process is for regular mail on port 25; the other is for
>> authenticated mail on port 587.
> 
> This is not exactly what you asked, but you can tell whether smtp
> auth was used:
> 
> if (defined($SendmailMacros{"auth_type"})) {
>       # whatever
> }

This *is* exactly what you asked: you can use
$SendmailMacros{"daemon_name"} to determine the name of the port that
the user connected to. That macro is passed to mimedefang by default,
using standard sendmail configurations.

For example, we have in our sendmail.mc file:

    dnl# replacement "submission" port, to be used for smtp-noscan
    DAEMON_OPTIONS(`Listen=32,Port=589,Name=MSA-noscan,M=Eaf')

... and then somewhere in the mimedefang code is:

sub scan_for_virus {
    ...
    if ( $SendmailMacros{"daemon_name"} =~ /noscan$/ ) {
        md_syslog('warning', "$MsgID: No virus scanning");
        return;
    }

    ...


That said, if you want to differentiate on if the user is authenticated
or not, then do so, using the code Joseph gave.

-- 
Jan-Pieter Cornet <joh...@xs4all.nl>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to