[Mimedefang] order of filter_* routines called
Adam Lanier
adam at krusty.madoff.com
Tue Nov 14 13:31:23 EST 2006
On Tue, 2006-11-14 at 10:37 -0600, Mike Campbell wrote:
> I'm trying to figure out what order the various filter_* routines are
> called during a session. I can find where filter_begin and filter_end
> are called but what about the order of the following:
>
> filter_relay
> filter_sender
> filter_helo (which apparently is going away)
> filter_recipient
>
> Can anyone give me the order in which they are executed? Specifically I
> have a filter_relay and looks like I need a filter_sender in my
> environment but need to know how they are evaluated. Would it be best to
> just combine the code from these procedures into a single procedure? If
> so which is the best to use?
In general, you can put all your filter code in filter_end. Depending
on your goals and environment, you may want to put code in
filter_(relay|sender|recipient). From `man mimedefang-filter`
SMTP FLOW
This section illustrates the flow of messages through MIMEDefang.
1. INITIAL CONNECTION
If you invoked mimedefang with the -r option and have
defined a filter_relay routine, it is called.
2. SMTP HELO COMMAND
The HELO string is stored internally, but no filter
functions are called.
3. SMTP MAIL FROM: COMMAND
If you invoked mimedefang with the -s option and have
defined a filter_sender routine, it is called.
4. SMTP RCPT TO: COMMAND
If you invoked mimedefang with the -t option and have
defined a filter_recipient routine, it is called.
5. END OF SMTP DATA
filter_begin is called. For each MIME part, filter is
called. Then filter_end is called.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20061114/e85fc6ec/attachment.sig>
More information about the MIMEDefang
mailing list