[milters] Archive

Lists Index Date Thread Search

Article: 779
From: Anthony Howe
Date: 2005-12-26 15:05:29 -0500
Subject: Re: milters order

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Sergey N. Romanov wrote:
> I have question again. How I can change milters order?

If all milters are specified by INPUT_MAIL_FILTER() macros, then the 
order of these macros gives the connection order.

> I have installed milter-sender, milter-cli, milter-length, milter-limit 
> and milter-error. I would like that milter-sender was after milter-cli, 
> milter-length and milter-limit.
> 
> I have these lines in .mc file:
> 
> define(`_FFR_MILTER', `1')
> 
> INPUT_MAIL_FILTER(`milter-cli',`S=unix:/var/run/milter/milter-cli.socket, 
> T=C:10s;S:10s;R:60s;E:10s')
> INPUT_MAIL_FILTER(`milter-error',`S=unix:/var/run/milter/milter-error.socket, 
> T=C:10s;S:10s;R:60s;E:10s')
> INPUT_MAIL_FILTER(`milter-length',`S=unix:/var/run/milter/milter-length.socket, 
> T=C:10s;S:10s;R:60s;E:10s')
> INPUT_MAIL_FILTER(`milter-limit',`S=unix:/var/run/milter/milter-limit.socket, 
> T=C:10s;S:10s;R:60s;E:10s')
> INPUT_MAIL_FILTER(`milter-report',`S=unix:/var/run/milter/milter-report.socket, 
> T=C:10s;S:10s;R:60s;E:10s')
> INPUT_MAIL_FILTER(`milter-sender',`S=unix:/var/run/milter/milter-sender.socket, 
> T=C:10s;S:10s;R:5m;E:10s')

This ordering looks fine.

> define(`confMILTER_MACROS_CONNECT', 
> confMILTER_MACROS_CONNECT`,{client_resolve}')
> define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')
> 
> define(`confINPUT_MAIL_FILTERS', 
> `milter-limit,milter-length,milter-cli,milter-sender,milter-error,milter-report') 
> in my .mc file.
> 
> But in sendmail log file I can see that milter-sender is the first milter.
> Or this is impossible because of confMILTER_MACROS_CONNECT and 
> confMILTER_MACROS_HELO?

No. The macros do not influence milter order. Some milters only 
participate at different stages AND what you see in the maillog will 
depend on how much log detail you have specified in sendmail and each 
milter.

Currently I run with sendmail set to:

	define(`confLOG_LEVEL', `9')
	define(`confMILTER_LOG_LEVEL', 9)

which reports the milter connection info. If you have

	-v info,trace			(other Snert milters)
	MailLogDetail=info,trace	(milter-sender only)

you should see the connection order, since all my milters act on 
filterOpen() requests to create their workspaces. If you leave off the 
"trace", then some milters will remain more silent at different stages.

By default "info" is on. You want "-v 0" to turn off the minor extra 
logging for each milter.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ:
7116561         AIM: Sir Wumpus

Sendmail Anti-Spam Solutions           http://www.snertsoft.com/
                                             We Serve Your Server

Lists Index Date Thread Search