|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Larry's smtp client loop
From: Anthony Howe (achowe+postfix-users
snert.com)
Date: Mon Jul 24 2006 - 10:59:57 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
As the author of the milters Larry Vaden is using I've decided to jump
into this discussion to see if I might be of help and also to avoid the
mixed answers I'm getting indirectly through copy/pasted responses of
others.
First question / clarification I need to know, since some little birds
keep telling me "Postfix works this way":
When there are more than one milter in use, are they run
in sequence or in parallel?
The reason for this question is that Sendmail 8 milter API executes all
of the following functions xxfi_header, xxfi_eoh, xxfi_body, and
xxfi_eom for a single milter before moving onto the next in sequence.
Thus header and body changes made by upstream milters can be seen by
downstream milters. This technique is used by some milters like
milter-ns or milter-p0f that simply add a header for processing
downstream by for example milter-spamc/SpamAssassin.
Here is an excerpt from "Sendmail Milters & Spam" by Bryan Costales and
Marcia Flynt:
Chapter 6.2:
"From the point of view of single sendmail process, the flow of commands
when email is received looks like following, where each Process step is
composed of a call to a Milter routine. Note the logic of how sendmail
interweaves the calls to (possibly) many Milters:
For each connection, do
| For each Milter, Process connection
| For each Milter, Process ELHO/HELO
| For each envelope, do
| | For each Milter, Process the sender
| | For each recipient, do
| | | | For each Milter, Process a recipient
| | For each Milter, do
| | | For each header, Process a header
| | | Process end of headers
| | | For each body chunk, Process a body chunk
| | | Process the end-of-data (end-of-message)
| For each Milter, Process close of envelope (clean up)
From what I've heard, Postfix may be handling milters in parallel and
so many milters are trying to update the same header at once and thus
conflict.
My milters gather the Subject header during xxfi_header calls, then in
xxfi_eom try to detect if the Subject: has already been tagged so as to
avoid duplicating identical tags.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]