[Mimedefang] Check @Recipients before stream_by_recipient?

Mark Tranchant mark at tranchant.plus.com
Fri Jul 22 10:39:01 EDT 2005


The man page for mimedefang_filter says of stream_by_recipient():

*********
This  function  should  only  be called at the very
beginning of filter_begin(), like this:

sub filter_begin {
    if (stream_by_recipient()) {
       return;
    }
    # Rest of filter_begin
}
*********

What's to stop me doing things before this stage? For example, if I have 
a spamtrap address on a web page, and the Recipient array contains that 
address, I would want to reject the message for all recipients:

sub filter_begin {
    if (spamtrap(@Recipients)) {
	action_bounce(...);
    }
    elsif (stream_by_recipient()) {
       return;
    }
    # rest of filter_begin - anything that gets this far is
    # one recipient at a time
}

Can I do that?

-- 
Mark.
mark at tranchant.plus.com
http://tranchant.plus.com/




More information about the MIMEDefang mailing list