/etc/init.d/opendkim fails to start opendkim when run over ssh with a pseudo-tty

From: Sam Umbach <sumbach_at_gmail.com>
Date: Fri, 15 Apr 2011 13:02:53 -0400

I've run into an issue with restarting the opendkim milter daemon over
ssh. I saw the issue on Ubuntu 10.10 Maverick and have already
reported it to the package maintainers
(https://bugs.launchpad.net/ubuntu/+source/opendkim/+bug/761967). I
am not sure if this issue is Ubuntu-specific.

Without a pty, opendkim start and restart properly launch the opendkim
milter daemon:
$ ssh -T ubuntu_at_192.168.2.117 sudo /etc/init.d/opendkim restart
Restarting OpenDKIM: opendkim.

But if I force pty allocation (as I do in my Capistrano deployments),
the opendkim daemon is NOT started:
$ ssh -tt ubuntu_at_192.168.2.117 sudo /etc/init.d/opendkim restart
Restarting OpenDKIM: opendkim.
Connection to 192.168.2.117 closed.

As a workaround, I am able to disable pty allocation in my capistrano script:
sudo "/etc/init.d/opendkim restart", :pty => false

* Can anyone confirm this issue on another distro?
* How does /etc/init.d/opendkim daemonize the opendkim milter?

Thanks,
Sam Umbach
sumbach_at_gmail.com
Received on Fri Apr 15 2011 - 17:03:10 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:20:17 PST