smtpd_milters

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

smtpd_milters

Michael Grimm-2
Hi

After reading http://www.postfix.org/MILTER_README.html there are some questions unanswered to me.

Let's assume one does define:

        smtpd_milters = milter1, milter2, …, milterX

README:
        "Milter applications are applied in the order as specified, and the first Milter application that rejects a command will override the responses from other Milter applications."

I do understand:
        milter2 rejects the mail in question, and thus, overrides all responses from milter1, …, milterX.

What I do not understand:
        Will all milters *after* milter2 become invoked although milter2 already did reject the mail in question?

In other words:
        Is there a way to stop invoking milters after the first "reject"?

Sorry, but I do not understand that README well enough to answer that questions by myself.

Thanks in advance and with kind regards,
Michael


Reply | Threaded
Open this post in threaded view
|

Re: smtpd_milters

A. Schulze


Am 30.12.2017 um 22:55 schrieb Michael Grimm:
> Hi
>
> After reading http://www.postfix.org/MILTER_README.html there are some questions unanswered to me.
also read the milter documentation part of the opensource sendmail for example at
https://sources.debian.org/data/main/s/sendmail/8.15.2-9/libmilter/docs/index.html

> Let's assume one does define:
>
> smtpd_milters = milter1, milter2, …, milterX
>
> README:
> "Milter applications are applied in the order as specified, and the first Milter application that rejects a command will override the responses from other Milter applications."
>
> I do understand:
> milter2 rejects the mail in question, and thus, overrides all responses from milter1, …, milterX.
override is the wrong word. ,Say "milter1 did not reject" and milterX is not relevant anymore.
 
> What I do not understand:
> Will all milters *after* milter2 become invoked although milter2 already did reject the mail in question?
>
> In other words:
> Is there a way to stop invoking milters after the first "reject"?
>
> Sorry, but I do not understand that README well enough to answer that questions by myself.

Milters callbacks are invoked for every smtp state. every milter may give one of seven answers.
https://sources.debian.org/data/main/s/sendmail/8.15.2-9/libmilter/docs/api.html#Miscellaneous

notice the concept of "connection-oriented" vs. "message- or recipient-oriented" callbacks.
https://sources.debian.org/data/main/s/sendmail/8.15.2-9/libmilter/docs/overview.html#ControlFlow

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: smtpd_milters

Michael Grimm-2
A. Schulze <[hidden email]> wrote
> Am 30.12.2017 um 22:55 schrieb Michael Grimm:

>> After reading http://www.postfix.org/MILTER_README.html there are some questions unanswered to me.

> also read the milter documentation part of the opensource sendmail for example at
> https://sources.debian.org/data/main/s/sendmail/8.15.2-9/libmilter/docs/index.html

I have done that, and now, the process flow is much clearer to me.

Thanks for those links and your help, and have a Happy New Year,
Michael