MERIGHI Marcus <mcmer-open...@tor.at> wrote: >hello Gilles, > >gil...@poolp.org (Gilles Chehade), 2012.04.14 (Sat) 20:18 (CEST): >> On Sat, Apr 14, 2012 at 07:48:24PM +0200, MERIGHI Marcus wrote: >> > hello (opensmtpd-) folks, >> > >> > I think OpenSMTPd aborts delivery to multiple aliased recipients as >soon >> > as a delivery attempt returns non-zero. >> > I consider this unwanted: a super user defined delivery list in >> > aliases(5) is not applied if some foolish luser messes up her/his >> > .forward. >> > >> > How I found out about this: >> > >> > in aliases(5): >> > foobar: b_user, a_user >> > >> > (Verbose log shows this get's reordered to a_user, b_user. I'm not >sure >> > that is good.) > >I was wrong there; the alias expansion is printed in reordered fashion >to the log; delivery is attempted in the specified order. > >> > forward(5) of a_user (that's the one tried first) >> > |/usr/local/bin/procmail >> > >> > after that delivery to b_user is not attempted. If I change >> > a_user's forward(5) to >> > |/usr/local/bin/procmail; exit 0 >> > >> > delivery to b_user is attempted. >> >> This is actually a known issue which is in my todo. > >that's good to know. Thanks (over and over again)! > >> What we do currently is generate a list of valid recipients and a >list of >> failed recipients. When we end the aliases expansion with a failed >list >> that's not empty we reject the entire batch. > >further testing of my workaround ``|/usr/local/bin/procmail; exit 0'' >showed that it works for two recipients (expanded from aliases) but not >for three; a test of the shell thingy: > >sudo su -l someuser -c "cat /somepath/testmail | /bin/sh -c \ > '/usr/local/bin/procmail || print FAIL && print SUCC'"
Such a construct would always print SUCC. Well, unless both procmail and "print FAIL" fails... /Alexander > >prints "SUCC". Therefore I see no real error condition there? > >The further testing was somewhat confusing: ordering of recipients >in aliases(5) matters; also, which recipient got the ``|| exit 0'' or >``; exit 0'' in his/her forward(5). Up to two recipients, it seems, it >needs to be the second rcpt; with more recipients I never saw a >delivery >to all of them, no matter who had the ``|| exit 0'' after the procmail >call (or all of them). Tests with ``|/bin/cat > /dev/null'' in >forward(5) made no difference. Maybe it's just that I'm tired. > >> In practice, we should simply iterate over the failed list and >generate a >> bounce, however we are unhappy with the current bounce code. Don't >worry, >> it will be fixed soon as I started playing with OpenSMTPD powered >mailing >> lists ;-) > >Please elaborate on that! Do you mean just having smtpd deliver to lots >of recipients via aliases or something beyond that? > >Thanks, Marcus