Daniel Hartmeier wrote
> Check what macros and values the milter gets from sendmail, either by
> logging daemon.debug in syslog.conf or running the milter with option -d
> manually. Any macro seen by the milter should then be printed. Usually
> looking at the values causes enlightenment ;)
>   
I have looked. Macro either are not transferred, or are transferred, but
it is very strange.
At machines which connected on auth in general in log it is not
specified. At machines which incorporate without auth it is specified,
but empty.

Here two machines - 77.236.34.164 and 77.236.35.22. They connect to
local for sendmail networks, but are connected through SSL/TLS, that is
visible from log. They pass authorization on SASL.

Jan 23 15:09:00 mail sm-mta[71081]: STARTTLS=server,
relay=user164.issp.ac.ru [77.236.34.164], version=TLSv1/SSLv3,
verify=NO, cipher=EDH-DSS-DES-CBC3-SHA, bits=168/168
Jan 23 08:13:10 mail sm-mta[15816]: STARTTLS=server,
relay=user22a.issp.ac.ru [77.236.35.22], version=TLSv1/SSLv3, verify=NO,
cipher=EDH-DSS-DES-CBC3-SHA, bits=168/168

The machine mail.sao.ru - alien. It too is connected through SSL/TLS.
Without authorization.

Jan 23 00:11:32 mail sm-mta[80509]: STARTTLS=server, relay=mail.sao.ru
[194.85.27.5], version=TLSv1/SSLv3, verify=NO,
cipher=DHE-DSS-AES256-SHA, bits=256/256

Further, from milter-regex.log it is visible, that for the authorized
machines parameters tls_version, auth_type, auth_authen are not
transferred in general, and for not authorized are transferred, but empty.

Jan 23 08:08:25 mail milter-regex[70319]: 77.236.34.164:
cb_connect('user164.issp.ac.ru', '77.236.34.164')
Jan 23 08:08:25 mail milter-regex[70319]: 77.236.34.164: macro
{daemon_name} =
Jan 23 08:08:25 mail milter-regex[70319]: 77.236.34.164: macro {if_name} =
Jan 23 08:08:25 mail milter-regex[70319]: 77.236.34.164: macro {if_addr}
= 77.236.34.3
Jan 23 08:08:25 mail milter-regex[70319]: 77.236.34.164: macro j =
mail.issp.ac.ru
Jan 23 08:08:25 mail milter-regex[70319]: 77.236.34.164: macro _ =
Jan 23 08:08:45 mail milter-regex[70319]: 77.236.34.164: cb_close()
Jan 23 08:12:50 mail milter-regex[70319]: 77.236.35.22:
cb_connect('user22a.issp.ac.ru', '77.236.35.22')
Jan 23 08:12:50 mail milter-regex[70319]: 77.236.35.22: macro
{daemon_name} =
Jan 23 08:12:50 mail milter-regex[70319]: 77.236.35.22: macro {if_name} =
Jan 23 08:12:50 mail milter-regex[70319]: 77.236.35.22: macro {if_addr}
= 77.236.34.3
Jan 23 08:12:50 mail milter-regex[70319]: 77.236.35.22: macro j =
mail.issp.ac.ru
Jan 23 08:12:50 mail milter-regex[70319]: 77.236.35.22: macro _ =
Jan 23 08:13:10 mail milter-regex[70319]: 77.236.35.22:
cb_helo('[77.236.35.22]')
Jan 23 08:13:10 mail milter-regex[70319]: 77.236.35.22: ACCEPT, Helo:
[77.236.35.22], From: , To: , Subject:
Jan 23 08:13:10 mail milter-regex[70319]: 77.236.35.22: cb_close()

Jan 23 00:05:57 mail milter-regex[70319]: 194.85.27.5:
cb_connect('mail.sao.ru', '194.85.27.5')
Jan 23 00:05:57 mail milter-regex[70319]: 194.85.27.5: macro {daemon_name} =
Jan 23 00:05:57 mail milter-regex[70319]: 194.85.27.5: macro {if_name} =
Jan 23 00:05:57 mail milter-regex[70319]: 194.85.27.5: macro {if_addr} =
77.236.34.3
Jan 23 00:05:57 mail milter-regex[70319]: 194.85.27.5: macro j =
mail.issp.ac.ru
Jan 23 00:05:57 mail milter-regex[70319]: 194.85.27.5: macro _ =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5:
cb_helo('mail.sao.ru')
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {tls_version} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {cipher} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {cipher_bits} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro
{cert_subject} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {cert_issuer} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5:
cb_helo('mail.sao.ru')
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {tls_version} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {cipher} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {cipher_bits} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro
{cert_subject} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {cert_issuer} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5:
cb_envfrom('<[EMAIL PROTECTED]>')
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro i =
m0ML5v19080150
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {auth_type} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {auth_authen} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {auth_ssf} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {auth_author} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {mail_mailer} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {mail_host} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {mail_addr} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5:
cb_envrcpt('<[EMAIL PROTECTED]>')
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro
{rcpt_mailer} = local
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {rcpt_host} =
Jan 23 00:06:17 mail milter-regex[70319]: 194.85.27.5: macro {rcpt_addr}
= gavrilov

My m4 settings for milters:
INPUT_MAIL_FILTER(`milter-regex', `S=local:/var/run/milter-regex/sock,
T=S:30s;R:2m')
INPUT_MAIL_FILTER(`greylist',
`S=local:/var/milter-greylist/milter-greylist.sock')
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock, F=,
T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `milter-regex,greylist,clmilter')

Milter-greylist, apparently from its work, all understands correctly.

What I need to make for the decision of a problem?

> Daniel
>   
Ogogon.

Reply via email to