[Mimedefang] stream_by_recipient question

Kelson Vibber kelson at speed.net
Wed Aug 7 15:21:01 EDT 2002

According to the man page for mimedefang_filter, stream_by_recipient() 
"should only be called at the very beginning of filter_begin()."

Is the reason for this that it needs the message to be unaltered?  If so, I 
was wondering whether the following idea would be feasible:

The only reason I want to separate messages by recipient is so that each 
can use his or her own SpamAssassin preferences (which is itself another 
issue).  But if it's outgoing mail with no recipients on my server, or if 
the message is large enough that I wouldn't be running SA on it anyway, 
streaming it just puts extra load on the server with no benefit.

Would it be acceptable to, in filter_begin, do the following:
         1. Check the whole message for viruses
         2. Check the relaying IP to see if it's local
         3. Check the size of the message to see if it's too large to 
bother with SA
         4. Depending on the outcome of those checks, call 

Since none of the first three actions will make any alterations to the 
message, the only concern I can see is that the virus scan will be run more 
than once on messages that are sent in to more than one local 
recipient.  That and I'd be relying on an undocumented capability, which is 
part of why I'm asking on this list (i.e. if it is possible, and it gets 
documented, then it's likely to stay possible).

I'm currently using MD 2.16 and Sendmail 8.12.5


Kelson Vibber
SpeedGate Communications, Technical Staff
kelson at speed.net          Phone: (949) 341-0800
http://www.speed.net/     FAX:   (949) 341-0900

More information about the MIMEDefang mailing list