[Mimedefang] Filters and Global Variables

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Wed Sep 14 11:14:14 EDT 2005


John Rudd wrote:
> Does the same child get called for all filter* subroutines?

Yes and no.  Each milter call is allocated to a child at random:

(connect) milter call
(HELO/EHLO) milter call
(MAIL FROM) milter call
(RCPT TO) milter call (possibly multiple RCPTs)
(DATA) milter call

The "connect" milter call is handled by filter_relay
It knows the IP of the connecting client, and the reverse DNS lookup if it exists.

The "HELO/EHLO" milter call is not handled by any MIMEDefang function -- probably because  rejection on a HELO / EHLO would be unexpected?

The MAIL FROM milter call is handled by filter_sender
It knows what filter_relay knows, as well as the HELO/EHLO and MAIL FROM info

The RCPT TO milter call is handled by filter_recipient
It knows what filter_sender knows, as well as the RCPT TO info

The DATA milter call is handled by:
filter_begin
for each MIME part:
	filter
		filter_multipart
filter_end

So the filter_begin, filter, filter_multipart, and filter_end functions are all called in the same child.  The other functions may or may not be.

-- 
Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
Hispanic Business Inc./HireDiversity.com       Software Engineer




More information about the MIMEDefang mailing list