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 -=-
ewen@imatixmailweb:~$ ps axu | grep [p]ostgrey
postgrey 11217  0.0  1.1  17912 11004 ?        Ss   03:05   0:00 
/usr/sbin/postgrey --pidfile=/var/run/postgrey.pid --daemonize --inet=10023 
--greylist-text=Your message has been greylisted. Please retry in %s seconds.
ewen@imatixmailweb:~$ sudo start-stop-daemon --stop --oknodo --quiet --pidfile 
/var/run/postgrey.pid --name postgrey
ewen@imatixmailweb:~$ ps axu | grep [p]ostgrey
postgrey 11217  0.0  1.1  17912 11004 ?        Ss   03:05   0:00 
/usr/sbin/postgrey --pidfile=/var/run/postgrey.pid --daemonize --inet=10023 
--greylist-text=Your message has been greylisted. Please retry in %s seconds.
ewen@imatixmailweb:~$ 
-=- cut here -=-

Removing "oknodo" and "quiet" reveals that "stop" is not actually doing
anything:

-=- cut here -=-
ewen@imatixmailweb:~$ sudo start-stop-daemon --stop --pidfile 
/var/run/postgrey.pid --name postgrey
No postgrey found running; none killed.
ewen@imatixmailweb:~$ ps axu | grep [p]ostgrey
postgrey 11217  0.0  1.1  17912 11004 ?        Ss   03:05   0:00 
/usr/sbin/postgrey --pidfile=/var/run/postgrey.pid --daemonize --inet=10023 
--greylist-text=Your message has been greylisted. Please retry in %s seconds.
ewen@imatixmailweb:~$ 
-=- 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 -=-
ewen@imatixmailweb:~$ sudo start-stop-daemon --stop --pidfile 
/var/run/postgrey.pid
ewen@imatixmailweb:~$ ps axu | grep [p]ostgrey
ewen@imatixmailweb:~$ 
-=- 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 -=-
ewen@imatixmailweb:~$ ps axu | grep [p]ostgrey
postgrey 11302  0.0  1.1  17920 10984 ?        Ss   03:16   0:00 
/usr/sbin/postgrey --pidfile=/var/run/postgrey.pid --daemonize --inet=10023 
--greylist-text=Your message has been greylisted. Please retry in %s seconds.
ewen@imatixmailweb:~$ sudo ls -l /proc/11302 | grep exe
lrwxrwxrwx 1 root     root     0 Sep  9 03:18 exe -> /usr/bin/perl
ewen@imatixmailweb:~$ 
-=- cut here -=-

which means the "name" check on start-stop-daemon will never match.

It also doesn't help that postgrey is unable to remove its PID file, due
to file permissions:

-=- cut here -=-
Sep  9 03:15:12 imatixmailweb postgrey[11217]: Couldn't unlink 
"/var/run/postgrey.pid" [Permission denied]
--= cut here -=-

(written as root, before setuid), leading to:

-=- cut here -=-
 * Starting postfix greylisting daemon postgrey                                 
Pid_file "/var/run/postgrey.pid" already exists.  Overwriting!
-=- cut here -=-

(And I think basically at this point if you don't see it, it's not
really starting again.)

Ewen

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1393768

Title:
  modifying /etc/default/postgrey variable "POSTGREY_TEXT" does not
  change postgrey text when an email is greylisted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgrey/+bug/1393768/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to