Prioritize header checks

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

Prioritize header checks

Tobi
Hi list

I have a content filter running in prequeue mode to which postfix talks
via smtpd_proxy_filter.
Runs fine, but ;-) it seems to me that postfix header checks are
evaluated after the msg has been processed by the content filter.

Is it somehow possible to tell postfix to run those checks **before**
msg is passed to the content filter?

Cheers

tobi
Reply | Threaded
Open this post in threaded view
|

Re: Prioritize header checks

Viktor Dukhovni


> On Nov 9, 2017, at 12:53 PM, Tobi <[hidden email]> wrote:
>
> I have a content filter running in prequeue mode to which postfix talks
> via smtpd_proxy_filter.

Best to call that a "proxy filter" to avoid confusion.

> Runs fine, but ;-) it seems to me that postfix header checks are
> evaluated after the msg has been processed by the content filter.

Header checks happen after proxy filters and before content filters.

> Is it somehow possible to tell postfix to run those checks **before**
> msg is passed to the content filter?

Only by using a content filter.  You can of course use all three: proxy
filters, header checks and content filters.  They will be processed in
that order.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: Prioritize header checks

Tobi

Am 09.11.2017 um 19:00 schrieb Viktor Dukhovni:
>
>
> Best to call that a "proxy filter" to avoid confusion.
>
okay I see so I have a proxy filter then. As I want to be able to reject
msg by my proxy filter I need the pre-queue approach.

>
> Only by using a content filter.
>
and content filter it this case means post-queue filter?

Background is that my header checks should match headers (ex marked
already as spam by sending server) of messages which I do not want to
feed to my proxy filter. As processing msg via my proxy filter invokes 3
av-scanners, spamassassin and several other plugins of that filter
software. Much work for a message that after proxy filter will be
rejected by postfix header checks anyway :-)

So if I got you right: it's not possible to run header checks before
proxy filter.

Cheers and thanks

tobi