Definition of new milter macros

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Definition of new milter macros

Damian Lukowski
Hi,

is it possible, in principle, to define new milter macros that are
passed to smtpd_milters? [1] does not list a macro that carries
information whether SMTPUTF8 is set. [2] mentions SMFIC_MACRO, but I
have no idea if that is what I think it might be.

Damian

[1] http://www.postfix.org/MILTER_README.html
[2]
https://github.com/avar/sendmail-pmilter/blob/master/doc/milter-protocol.txt
Reply | Threaded
Open this post in threaded view
|

Re: Definition of new milter macros

Damian Lukowski
I just realized this is an X-Y problem. The flag is on-the-wire as a
part of the M macro.

> is it possible, in principle, to define new milter macros that are
> passed to smtpd_milters? [1] does not list a macro that carries
> information whether SMTPUTF8 is set. [2] mentions SMFIC_MACRO, but I
> have no idea if that is what I think it might be.
Reply | Threaded
Open this post in threaded view
|

Re: Definition of new milter macros

Wietse Venema
Damian:
> I just realized this is an X-Y problem. The flag is on-the-wire as a
> part of the M macro.

To clarify this for the readership: In the Milter protocol, the M
*command* sends the MAIL FROM command including SMTPUTF8 parameter
if it is present.

The Postfix definition for this command code is this:

#define SMFIC_MAIL              'M'     /* MAIL from */

Whereas SMFIC_MACRO sends a list of (name, value) pairs configured
with Postfix milter_{connect,helo,mail,rcpt,data,etc}_macros.

If your Milter can inspect the MAIL FROM command parameters, then
that is a reliable way to find out that Postfix accepted the command
and that the client requested SMTPUTF8 functionality.

Generally, I am not aware of Milter *macros* that propagate which
ESMTP features are activated (such as PIPELINING, DSN, or SMTPUTF8).
But that can easily be found out by looking at MAIL FROM and RCPT
TO command parameters.

        Wietse

> > is it possible, in principle, to define new milter macros that are
> > passed to smtpd_milters? [1] does not list a macro that carries
> > information whether SMTPUTF8 is set. [2] mentions SMFIC_MACRO, but I
> > have no idea if that is what I think it might be.
>