[Mimedefang] SMTP AUTH?

Nels Lindquist nlindq at maei.ca
Mon Aug 9 19:29:41 EDT 2004


On 7 Aug 2004 at 20:25, Richard A Nelson wrote:

> On Sat, 7 Aug 2004, Jon Fullmer wrote:
> >
> > Is there a way to tell MIMEDefang not to check e-mails from a user that has
> > properly authenticated with SMTP AUTH?
> 
> I'm new to mimedefang, so this is just a guess, but it looks like
> sendmail will (by default) pass the auth_ macros to the from: callout.
> 
> This means that in the filter_sender function you should be able to
> use something like:
> 	if ($SendmailMacros{"auth_type"} = 'ok') {
> 		return ('ACCEPT_AND_NO_MORE_FILTERING', 'ok');
> 		};

Depending on your policy, you may want to omit calling SpamAssassin 
on authenticated mail while continuing to scan such mail for viruses.

We call SA in filter_end() but skip the spam check if the message 
exceeds 100Kb in size, if a virus has already been detected (in which 
case the message is rejected), if the sending relay is on our local 
network, or if the sender has authenticated with SMTP AUTH.

>if ((-s "./INPUTMSG" < 100*1024) && $VirusFound == 0
>    && ! is_in_subnet($RelayAddr, %LocalRelays)
>    && ! exists($SendmailMacros{'auth_authen'})) {
>($hits, $req, $tests, $report) = spam_assassin_check();
>}

----
Nels Lindquist <*>
Information Systems Manager
Morningstar Air Express Inc.



More information about the MIMEDefang mailing list