On 14/01/2020 20:31, Bill Cole wrote:
> I can confirm that a milter absolutely can request and receive macros from
> postfix, PROVIDED those macros are available. I use the MIMEDefang milter,
> which optionally uses smfi_setsymlist() to request macros and includes
> options to ask for specific arbitrary macros. On one testbed I happen to have
> this set up in a debug mode which logs which macros are available to MD at
> RCPT time, showing me these recently:
>
> Jan 14 14:01:35 bigsky mimedefang.pl[79121]: 47y0Db2FRdz3SRhl: Macros are _
> daemon_name mail_host mail_mailer j daemon_port client_port mail_addr
> Jan 14 14:01:52 bigsky mimedefang.pl[79121]: 47y0Dw15yXz3SRjV: Macros are
> tls_version cipher daemon_name _ j mail_mailer mail_host client_port
> daemon_port cipher_bits mail_addr
> Jan 14 14:02:50 bigsky mimedefang.pl[79121]: 47y0G25N4wz3SRjt: Macros are
> daemon_port client_port auth_authen cipher_bits mail_addr auth_type
> tls_version cipher j mail_host mail_mailer daemon_name _
> Jan 14 14:06:03 bigsky mimedefang.pl[79121]: 47y0Kl45zxz3SRsL: Macros are
> tls_version cipher mail_mailer mail_host j daemon_name _ daemon_port
> client_port mail_addr cipher_bits
> Jan 14 14:06:36 bigsky mimedefang.pl[79121]: 47y0LN3dBLz3SRsx: Macros are
> tls_version cipher _ daemon_name j mail_mailer mail_host client_port
> daemon_port cipher_bits mail_addr
> Jan 14 14:07:34 bigsky mimedefang.pl[79121]: 47y0MV0CwGz3SRtj: Macros are
> tls_version cipher mail_mailer mail_host j _ daemon_name daemon_port
> client_port mail_addr cipher_bits
> Jan 14 14:13:38 bigsky mimedefang.pl[79121]: 47y0VT6hNPz3SRvm: Macros are
> daemon_port client_port mail_addr mail_host mail_mailer j _ daemon_name
> Jan 14 14:23:05 bigsky mimedefang.pl[79121]: 47y0jP4hxNz3SRwW: Macros are _
> daemon_name mail_mailer mail_host j client_port daemon_port mail_addr
>
> This is quite different from the Postfix config, which has the default value:
>
> bigsky:~ bill$ postconf milter_rcpt_macros
> milter_rcpt_macros = i {rcpt_addr} {rcpt_host} {rcpt_mailer}
>
> So, whatever problem you are having with getting the macros you want is NOT
> intrinsic to Postfix.
Thanks Bill,
I have reproduced this both with an independent milter application and
with the Postfix test-milter program. Are you sure MIMEDefang uses the
libmilter API? It isn’t a pure Perl milter implementation?
Beginning to get a little confused ...