Hi All

Apologies for not being clear in my earlier message.

What I want is for the content filter to be invoked once per message and
not per recipient. I tried setting various values for
*_destination_recipient_limit (including 1) to get the desired behavior.
But no matter what value I set, Postfix still invokes the filter for each
recipient. Here are the settings for filter in master.cf:

192.168.1.10:10025  inet    n   -   n   -   -   smtpd
    -o content_filter=my_filter

my_filter    unix    -   n   n   -   -   pipe
    flags=Rq user=testuser argv=/usr/local/bin/my_filter.py -f ${sender}
${client_address} -- ${recipient}

Settings in main.cf that I have overridden:

mynetworks = 192.168.1.0/24 127.0.0.0/8

smtpd_client_restrictions =
    permit_mynetworks,
    reject_unauth_destination,
    permit

Values for *_destination_recipient_limit are at their default values:

default_destination_recipient_limit = 50
error_destination_recipient_limit = $default_destination_recipient_limit
my_filter_destination_recipient_limit = $default_destination_recipient_limit
lmtp_destination_recipient_limit = $default_destination_recipient_limit
local_destination_recipient_limit = 1
relay_destination_recipient_limit = $default_destination_recipient_limit
retry_destination_recipient_limit = $default_destination_recipient_limit
smtp_destination_recipient_limit = $default_destination_recipient_limit
virtual_destination_recipient_limit = $default_destination_recipient_limit

Thanks
Arshad
On Thu, Aug 30, 2018 at 10:52 PM Viktor Dukhovni <postfix-us...@dukhovni.org>
wrote:

>
>
> > On Aug 30, 2018, at 7:27 AM, Arshad Khan <khan.m.ars...@gmail.com>
> wrote:
> >
> > I have been using Postfix 2.6.6 on CentOS 6 which I have configured
> > with an 'After-queue content filter'. The filter gets invoked when an
> > email is received by Postfix. The content filter does some processing
> > and pass on the message to another server from where the message is
> > sent to the recipients.
> >
> > Recently I built version 2.11.11 and configured it to use the same
> > content filter. However, now Postfix is invoking the content filter
> > for each of the recipient. I would like it to invoke the filter once
> > per message and not per recipient. What configuration setting should I
> > alter to get the desired behaviour?
>
> This is anecdotal retelling of your situation, with none of the supporting
> evidence.  For useful help you need to post configuration information and
> relevant logs.
>
> For example, how is the content filter specified?  Is it just the transport
> name or "transport:nexthop", ...  But instead of teasing out configuration
> settings one by one with follow-up messages, see:
>
>         http://www.postfix.org/DEBUG_README.html#mail
>
> --
>         Viktor.
>
>

Reply via email to