[Pymilter] really long processing

Stuart D. Gathman stuart at bmsi.com
Tue May 11 17:09:01 EDT 2004


On Tue, 11 May 2004, Eric S. Johansson wrote:

> the reason I was asking about testing for threading was so that I would 
> no whether or not use process resource locks within my code in 
> conjunction with the file based locks.  It's probably harmless if I just 
> add the resource locks.

If multiple threads are contending for a file lock, you definitely need
the resource lock.  It will improve performance, but more importantly,
most file locking schemes use the process id - which will be the same
for all the threads causing suprising and unpleasant results.

> > If you return TEMPFAIL, then the sender will retry later. 
> 
> that's possibly another option.  If I'm busy generating stamps and I 
> need to generate another, just force a retry.  The retry what happen in 
> conjunction with an ordinary queue scan?  is there a way to trigger a 
> retry when done?  Is it possible to put messages on a separate queue for 
> the milter?

The retry is up to the sending MTA.  If that MTA is sendmail, it happens
on the next queue scan.  Using TEMPFAIL for this purpose has the additional
benefit that most spammers give up after a TEMPFAIL, since they aren't
sending from a real message queue, but generating the message on the fly.
(A simple field proven anti-spam strategy is simply generate TEMPFILE
the first time you get a message that is not otherwise authenticated,
save the Message-ID in a database, and accept it the second time.)

A risk to using TEMPFAIL is that after a certain amount of time (typically
4 hours), the MTA will send a warning bounce back to the user saying
"unable to deliver mail after 4 hours, will keep trying for 5 days" or
something to that effect.  End users are always confused by warning bounces,
and never read them, but just assume that the message failed.  They
then send another message - which typically compounds the problem or delay.

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




More information about the Pymilter mailing list