[Pymilter] envrcpt not called after returning ACCEPT

Chris Heller heller at teragram.com
Mon Jul 30 14:24:31 EDT 2007


I changed ACCEPT to CONTINUE and now my Milter works.

I presume you are referring to connection, or message oriented contexts
in which REJECT causes further processing to be skipped, right? In a
recipient context REJECT seems to work just as planned.

Thanks,
Chris

-----Original Message-----
From: Stuart D. Gathman [mailto:stuart at bmsi.com] 
Sent: Monday, July 30, 2007 2:15 PM
To: Chris Heller
Cc: pymilter at bmsi.com
Subject: Re: [Pymilter] envrcpt not called after returning ACCEPT


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.


<!DSPAM:114185FA69327434324773520>





More information about the Pymilter mailing list