Hello!

Could someone please tell me if and how I can control the grouping of
recipients in one delivery via pipe?
If I have a content filter and I want it to receive each recipient in
a seperate message I can have them split up with this:

default_destination_recipient_limit = 1

That works fine. But there doesn't seem to be a way to _force_ multiple
recipients. Reading pipe(8) it seems that it would be the normal behaviour
to not split up the recipients up to the configured limit (where the default
is 50). Accordingly the manpage doesn't say how to achieve that, if it does
not happen automatically. It seems that it does depend on the domains of the
recipients though.

I made myself a content filter like this:

127.0.0.1:25000      inet  n       -       n       -       -       smtpd
        -o relay_recipient_maps=hash:/etc/postfix/valid_recipients
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o content_filter=my_filter

my_filter     unix  -   n   n   -   -   pipe flags=q user=filteruser 
null_sender= argv=/tmp/my_filter.sh
    --
    --sender=${sender}
    --recipient=${recipient}
    --nexthop=my_nexthop


The valid_recipients-map looks like this:

a...@aaa.test.de          stmp:[127.0.0.1]:25001
a...@aaa.test.de          stmp:[127.0.0.1]:25002
b...@bbb.test.de          stmp:[127.0.0.1]:25001
b...@bbb.test.de          stmp:[127.0.0.1]:25002

When I now send a mail to a1 and a2 my filter is called once, with both
recipients included. The same with b1 and b2. But if I mix a1 and b1 then
the filter is called twice, with only one recipient per call.
But I have not set any recipient_limit, so up to 50 recipients should remain
intact.
Also it does not seem to depend on the routing, because that is the
same for a1 and b1. Only the domain makes the difference.
The domains are nothing special, neither mydomain or myorigin or anything
like that.

So the question is: is it necessary for postfix to split up the recipients
which do not share a domainname? Are there any problems or dangers in
keeping all recipients together? Can this behaviour be configured?
The problem for me is, that my filter needs to know all the recipients at
the same time to take the proper action (which is otherwise not mail-
related).

I have postfix 2.7.1, by the way.

Thanks & all the best,
rob


-- 
tarent Gesellschaft für Softwareentwicklung und IT-Beratung mbH
Geschäftsführer: Boris Esser, Elmar Geese
HRB AG Bonn 5168 - USt-ID (VAT): DE122264941

Heilsbachstraße 24,  53123 Bonn,   Telefon: +49 228 52675-0
Thiemannstraße 36 a, 12059 Berlin, Telefon: +49 30 5682943-30
Internet: http://www.tarent.de/  • Telefax: +49 228 52675-25

Reply via email to