mail-filter/postgrey 1.31 /etc/conf.d/postgrey: POSTGREY_TEXT is commented (so it's not assigned in the init.d script) And i have in conf.d/postgrey: POSTGREY_OPTS="--verbose --greylist-text=Greylisted --greylist-action=421" $ cat /proc/xxx/cmdline /usr/sbin/postgrey --inet=127.0.0.1:10030 --daemonize --pidfile=/var/run/postgrey.pid --delay=1010 --verbose --greylist-text=Greylisted --greylist-action=REJECT# (note the 2 spaces between delay and verbose, which is, in fact, "") I get: rcpt to:<schmurtz> 450 4.2.0 <schmurtz>: Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/schmurtz.html and nothing verbose. If i add something in POSTGREY_TEXT, it's OK: POSTGREY_TEXT="azeertyuipmqlfkjlkhgaaa bbb" (what a nice example config file :) ) $ cat cmdline /usr/sbin/postgrey --inet=127.0.0.1:10030 --daemonize --pidfile=/var/run/postgrey.pid --delay=1010 --verbose --greylist-text=Greylisted --greylist-action=REJECT# rcpt to:<schmurtz> 421 4.2.0 <schmurtz>: Recipient address rejected: Greylisted Connection closed by foreign host. and it's now verbose (TCP connections in syslog) I added debug code in /usr/sbin/postgrey line 501, and it confirmed that GetOptions() does not take into account --verbose, --greylist-text, nor --greylist-action. Fix: the init.d script should NOT add "" as argument to start-stop-daemon ${POSTGREY_DELAY_ARG} \ - "${POSTGREY_TEXT_ARG}" \ + ${POSTGREY_TEXT_ARG} \ ${POSTGREY_OPTS}
hum, that fails if POSTGREY_TEXT contains more that one word. (i tried with "Greylisted.") Then here is another fix: invert the two args, exactly as in bug 119109 ${POSTGREY_DELAY_ARG} \ - "${POSTGREY_TEXT_ARG}" \ - ${POSTGREY_OPTS} + ${POSTGREY_OPTS} \ + "${POSTGREY_TEXT_ARG}" And warn users to not put options with spaces in $POSTGREY_OPTS in /etc/conf.d/postgrey. Instead, put your text in ${POSTGREY_TEXT_ARG} *only*.
(In reply to comment #1) > hum, that fails if POSTGREY_TEXT contains more that one word. (i tried with > "Greylisted.") yeah, that was a fix from #119109, too. > Then here is another fix: invert the two args, exactly as in bug 119109 > > ${POSTGREY_DELAY_ARG} \ > - "${POSTGREY_TEXT_ARG}" \ > - ${POSTGREY_OPTS} > + ${POSTGREY_OPTS} \ > + "${POSTGREY_TEXT_ARG}" > > And warn users to not put options with spaces in $POSTGREY_OPTS in > /etc/conf.d/postgrey. Instead, put your text in ${POSTGREY_TEXT_ARG} *only*. I'll do some further testing on that during the weekend and get this committet then. Thanks for providing the fix :)
(In reply to comment #2) > > I'll do some further testing on that during the weekend and get this committet > then. Thanks for providing the fix :) > ping
pong - and fixed in CVS.