Bug#793814: Workaround for this bug

James Bottomley James.Bottomley at HansenPartnership.com
Wed Oct 14 23:16:13 BST 2015


Since there doesn't seem to have been any progress on this from the
systemd side, and I'm really tired of my email users yelling at me
(justifiably since once the systemd-logind service dies, dovecot sasl
fails to work and they can't send email), this is the script I came up
with to alleviate the problem:

---
#!/bin/bash
##
# shell script to restart systemd.logind when it fails
##
tail -F /var/log/auth.log|while read junk; do
        case $junk in
                *pam_systemd*org.freedesktop.login1*timed\ out*)
                        echo $junk
                        systemctl restart systemd-logind.service
                        ;;
        esac
done
---

You spawn it from init (redirected to a log) and it will monitor the
authentication log for any indication that systemd-logind has dropped
off the dbus and respawn it.   The effect is that even if they get a
SASL authentication failure one time, it will already be working the
next time they try.

James



More information about the Pkg-systemd-maintainers mailing list