[Pymilter] envrcpt not called after returning ACCEPT

Stuart D. Gathman stuart at bmsi.com
Mon Jul 30 14:15:23 EDT 2007


On Mon, 30 Jul 2007, Chris Heller wrote:

> I've got a question about the Python Milter behavior.
> 
> I created a Milter which does whitelist filtering on the RCPT TO value.
> It is working correctly while I feed it invalid addresses (addresses
> which return Milter.REJECT from the envrcpt() method), however once I
> feed it a valid address (address which returns Milter.ACCEPT from the
> envrcpt() method) the envrcpt() method is no longer called.
> 
> This allows any invalid addresses to get past the Milter once a single
> valid address has been accepted.
> 
> Is there something I can do to change this behavior?

This is actually libmilter behaviour.  Returning ACCEPT causes all
further callbacks to be skipped.  Return CONTINUE to continue with
callbacks.  In many contexts, returning REJECT also causes all further
callbacks to be skipped.  Refer to the libmilter API for details.

PS: I subscribed you to the list.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Pymilter mailing list