On Thu, Sep 25, 2025 at 03:27:14PM +0300, lists+postfix--- via Postfix-users
wrote:
> master.cf:
> dx unix - n n - 20 pipe
> flags=Rq argv=/usr/local/bin/someprog ${sender} ${recipient}
Works as documented for me:
$ postconf foo_destination_recipient_limit
foo_destination_recipient_limit = 300
$ postconf -Mf pickup/unix foo/unix
pickup unix n - n 60 1 pickup
-o content_filter=foo:
foo unix - n n - - pipe flags=Fq.
user=nobody argv=/var/tmp/logcnt $sender $nexthop $recipient
$ cat /var/tmp/logcnt
#!/bin/sh
exec /usr/bin/logger -p user.info "$1 $2 $#"
$ </dev/null sendmail -f [email protected] -i rcpt{1..500}@t.ex
$ grep [email protected] /var/log/messages
Sep 25 23:46:22 amnesiac nobody[2257]: [email protected] t.ex 302
Sep 25 23:46:22 amnesiac nobody[2258]: [email protected] t.ex 202
Logging shows a single delivery of the first 300 recipients, then
another for the next 200. On the other handl when the recipient
domains are not all the same:
$ </dev/null sendmail -f [email protected] -i rcpt{1..50}@t.ex{0..9}
$ grep [email protected] /var/log/messages
Sep 25 23:49:27 amnesiac nobody[2282]: [email protected] t.ex0 52
Sep 25 23:49:27 amnesiac nobody[2283]: [email protected] t.ex1 52
Sep 25 23:49:27 amnesiac nobody[2284]: [email protected] t.ex2 52
Sep 25 23:49:27 amnesiac nobody[2286]: [email protected] t.ex3 52
Sep 25 23:49:27 amnesiac nobody[2287]: [email protected] t.ex4 52
Sep 25 23:49:27 amnesiac nobody[2288]: [email protected] t.ex5 52
Sep 25 23:49:27 amnesiac nobody[2289]: [email protected] t.ex6 52
Sep 25 23:49:27 amnesiac nobody[2290]: [email protected] t.ex7 52
Sep 25 23:49:27 amnesiac nobody[2292]: [email protected] t.ex8 52
Sep 25 23:49:27 amnesiac nobody[2293]: [email protected] t.ex9 52
That's because with "foo" as the content filter, the nexthop is taken
from the recipient domain. To force a single nexthop, the content
filter should be "foo:dummy" or some other fixed nexthop value.
--
Viktor. 🇺🇦 Слава Україні!
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]