Problem: fetchmail is not restarted after user changes in "single-drop"

Problem:

fetchmail is not restarted after user changes in “single-drop”
If fetchmail is restarted via the listener due to changes to users, no more emails will be retrieved. Only after restarting via “systemctl restart fetchmail” everything will work again.

Investigation:

listener.log ( listener/debug/level: 3 )
grep fetchmail /var/log/univention/listener.log
...
2026-02-06T15:09:55.864321+01:00     INFO handler: fetchmailrc (successful)
2026-02-06T15:10:10.878314+01:00     INFO postrun handler: fetchmailrc (prepared=-1)
2026-02-06T15:10:10.878337+01:00     INFO Restarting fetchmail-daemon

---

mail.log
grep fetchmail /var/log/mail.log; date
...
2026-02-06T15:09:40.509247+01:00 ucs-ox fetchmail[1707005]: sleeping at Fr 06 Feb 2026 15:09:40 CET for 60 seconds
2026-02-06T15:10:40.569819+01:00 ucs-ox fetchmail[1707005]: awakened at Fr 06 Feb 2026 15:10:40 CET
2026-02-06T15:10:40.570036+01:00 ucs-ox fetchmail[1707005]: restarting fetchmail (/etc/fetchmailrc changed)
Fr 6. Feb 15:27:58 CET 2026

Solution /Workaround

A workaround seems to be patching listeners fetchmailrc.py, with restarting the univention-directory-listener.service

sed -i "s|listener.run('systemctl', \['restart', 'fetchmail'\], uid=0)|listener.run('/usr/bin/systemctl', ['systemctl', 'restart', 'fetchmail'], uid=0)|" /usr/lib/univention-directory-listener/system/fetchmailrc.py

systemctl restart univention-directory-listener.service

see also Bug 59036