modifying /etc/default/postgrey variable "POSTGREY_TEXT" does not change postgrey text when an email is greylisted
Bug #1393768 reported by
flrichar
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgrey (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Modifying the POSTGREY_TEXT variable under /etc/default/
POSTGREY_
I've also modified the init script, it seems as if it's including a carriage return or setting the entire string to null, so it doesn't include the --greylist-text option on bootup.
I have postgrey working with the greylist text option under a different distro, having to modify its systemctl startup scripts.
To post a comment you must log in.
I ran into what looked like this problem (on Ubuntu 14.04 LTS, with the postgrey 1.34-1.2 package).
After a bunch of debugging it turned out that neither "service postgrey stop" nor "service postgrey restart" were actually _stopping_ the postgrey daemon, which meant it never started with the new parameters (which meant it kept using the default text). Once I realised that and manually killed the old postgrey daemon ("ps ax | grep postgrey", "kill $PID") and verified it was gone, I could then do "service postgrey start" and (a) the new text appeared on the command line ("ps ax | grep postgrey") and (b) the new text was used in the log/SMTP session.
So it appears the root cause is that "service postgrey stop" does not in fact result in stopping postgrey, despite claiming to. (Even when run with "sudo") Because the "stop" has "oknodo" and "quiet" on it, there's apparently no logging of the fact nothing stopped.
-=- cut here -=- web:~$ ps axu | grep [p]ostgrey /var/run/ postgrey. pid --daemonize --inet=10023 --greylist- text=Your message has been greylisted. Please retry in %s seconds. web:~$ sudo start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/ postgrey. pid --name postgrey web:~$ ps axu | grep [p]ostgrey /var/run/ postgrey. pid --daemonize --inet=10023 --greylist- text=Your message has been greylisted. Please retry in %s seconds. web:~$
ewen@imatixmail
postgrey 11217 0.0 1.1 17912 11004 ? Ss 03:05 0:00 /usr/sbin/postgrey --pidfile=
ewen@imatixmail
ewen@imatixmail
postgrey 11217 0.0 1.1 17912 11004 ? Ss 03:05 0:00 /usr/sbin/postgrey --pidfile=
ewen@imatixmail
-=- cut here -=-
Removing "oknodo" and "quiet" reveals that "stop" is not actually doing anything:
-=- cut here -=- web:~$ sudo start-stop-daemon --stop --pidfile /var/run/ postgrey. pid --name postgrey web:~$ ps axu | grep [p]ostgrey /var/run/ postgrey. pid --daemonize --inet=10023 --greylist- text=Your message has been greylisted. Please retry in %s seconds. web:~$
ewen@imatixmail
No postgrey found running; none killed.
ewen@imatixmail
postgrey 11217 0.0 1.1 17912 11004 ? Ss 03:05 0:00 /usr/sbin/postgrey --pidfile=
ewen@imatixmail
-=- cut here -=-
even though it is in fact still running (these tests done after I'd already done the kill/restart, to try to find out why "stop" didn't).
I think the problem is that the name match doesn't match, because it works without that:
-=- cut here -=- web:~$ sudo start-stop-daemon --stop --pidfile /var/run/ postgrey. pid web:~$ ps axu | grep [p]ostgrey web:~$
ewen@imatixmail
ewen@imatixmail
ewen@imatixmail
-=- cut here -=-
And I think that in turn is due to postgrey being a Perl script, so the executable running is perl, not "postgrey". Eg,
-=- cut here -=- web:~$ ps axu | grep [p]ostgrey /var/run/ postgrey. pid --daemonize --inet=10023 --greylist- text=Your message has been greylisted. Please retry in %s seconds. web:~$ sudo ls -l /proc/11302 | grep exe web:~$
ewen@imatixmail
postgrey 11302 0.0 1.1 17920 10984 ? Ss 03:16 0:00 /usr/sbin/postgrey --pidfile=
ewen@imatixmail
lrwxrwxrwx 1 root root 0 Sep 9 03:18 exe -> /usr/bin/perl
ewen@imatixmail
-=- cut here -=-
which means the "name" check...