[Mimedefang] Mimedefang/logwatch interaction

Philip Prindeville philipp_subx at redfish-solutions.com
Tue Feb 20 14:43:52 EST 2007


PF wrote:

>On Mon, 2007-02-19 at 21:55 -0700, Philip Prindeville wrote:
>  
>
>>I was wondering...  In the case of programs that run locally and
>>then generate mail like "cron" and "logwatch", what test can one
>>do within filter_begin() to decide to skip any processing on the
>>rest of the message?
>>
>>Should ${daemon_flags} be part of Milter.macros.connect?
>>
>>I was thinking that this would also be useful to avoid recursion
>>from resend_message*().
>>
>>-Philip
>>    
>>
>
>One solution is to test the source ip address near the end of
>filter_multipart():
>
> if ($RelayAddr eq "127.0.0.1") {
> return action_accept();   # Or other stuff
> }    
>
>  
>

Quoting the man page:

DISPOSITION
       mimedefang.pl examines each part of the MIME message  is  examined  and
       chooses  a  disposition.   Unless otherwise indicated, the dispositions
       should be called only from filter and not filter_begin or filter_end.


so why call it from filter_multipart() and not filter_begin() or
filter()?  Don't you want to accept the message atomically and
stop further filtering of it?  I.e. short-circuit the testing...

Can anyone think of any other methods to detect messages queued
locally rather than accepted over a socket?  I.e. messages read
from stdin?

Also, I tried to look at $SendmailMacros{'daemon_name'} but that
never seems to be set.  Ditto for daemon_flags.

-Philip







More information about the MIMEDefang mailing list