[milters] Archive

Lists Index Date Thread Search

Article: 959
From: Anthony Howe
Date: 2006-06-06 04:29:48 -0400
Subject: Snert milters, sendmail.mc, and Dreyfus' milter-greylist

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

For some reason in the last three weeks I'm seeing support questions for 
my software like milter-spamc crashing or milter-sender call-ahead not 
working or some other odd behaviour. The one thing they all have in 
common at these sites are is they use or have used Dreyfus' 
milter-greylist in conjunction with one or more Snert milters.

I suspect milter-greylist has a serious documentation or installation 
bug or bad milter-greylist.m4, because the end result is that the 
sendmail.mc ends up broken with respect to the settings of ALL the 
confMILTER_MACROS_* definitions.

One user had specified:

define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
define(`confMILTER_MACROS_ENVRCPT', `{greylist}')

which is WRONG!

The above will crash milter-spamc prior to version 1.9 (soon to be 
released). It has adverse affects on the correct functioning of 
milter-sender and possibly some other Snert or third party milters.

What is happening is the above macro definitions completely replace the 
default definitions found in cf/m4/cfhead.m4 and so break the assumed 
communication of important sendmail macros to the milters. See the 
bottom of the milter API documention here:

	http://www.milter.org/milter_api/installation.html

If you use or have used Dreyfus' milter-greylist, please check your 
sendmail.mc file. Typically if you don't touch any of the 
confMILTER_MACROS_* definitions and don't use FEATURE(`milter-greylist') 
(an extension FEATURE not part of the sendmail source distribution), you 
should be OK.

However, if you do use milter-greylist then I suggest you comment out 
the FEATURE(`milter-greylist') if given and/or replace the above macros 
definitions with the correct ones.

Below is the CORRECT macro definitions that include the default values, 
plus any additional values required by milter-sender or milter-greylist:


dnl Defaults plus {client_resolve} for milter-sender.
define(`confMILTER_MACROS_CONNECT', `j, _, {daemon_name}, {if_name}, 
{if_addr}, {client_resolve}')

dnl Defaults plus {verify} for milter-sender, milter-greylist.
define(`confMILTER_MACROS_HELO', `{tls_version}, {cipher}, 
{cipher_bits}, {cert_subject}, {cert_issuer}, {verify}')

dnl Defaults
define(`confMILTER_MACROS_ENVFROM', `i, {auth_type}, {auth_authen}, 
{auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}')

dnl Defaults plus {greylist} for milter-greylist.
define(`confMILTER_MACROS_ENVRCPT', `{rcpt_mailer}, {rcpt_host}, 
{rcpt_addr}, {greylist}')

dnl Defaults
define(`confMILTER_MACROS_EOM', `{msg_id}')


To verify if you have a broken .mc file, you should look at the 
generated sendmail.cf file for the "O Milter.macros." lines. They should 
look like:

O Milter.macros.connect=j, _, {daemon_name}, {if_name}, {if_addr}, 
  {client_resolve}

O Milter.macros.helo={tls_version}, {cipher}, {cipher_bits}, 
{cert_subject}, {cert_issuer}, {verify}

O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf}, 
{auth_author}, {mail_mailer}, {mail_host}, {mail_addr}

O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}

O Milter.macros.eom={msg_id}

They should contain all the default macros names a milter might require 
and any additional macros that some milters might specially need.

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         AIM: SirWumpus    Sendmail Milter Solutions
http://www.snert.com/     ICQ: 7116561
     http://www.snertsoft.com/

Lists Index Date Thread Search