1

I am running dovecot and postfix on a 22.04.3 LTS Ubuntu server. Every day at 6:25 first the dovecot server and then the Postfix server gets stopped (it started about a month ago). It starts again right after that.

I figured out that it is a Cronjob that only runs at this time. test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily

After that first dovecot and then postfix get killed with signal 15. They start back up one second after. I tried searching why this is happening, but I could not find any further details. This error keeps happening even after a restart of the server daily at 6:25.

In syslog there is no further entry than the CRON execution, the stop and starting of the services.

6
  • Does /etc/cron.daily run logrotate? Does logrotate config include postfix and dovecot restart?
    – raj
    Commented Feb 2 at 13:55
  • I did not configure it at least, where could I check if this happened? Is there a specific logrotate-log? weekly su root adm rotate 4 create include /etc/logrotate.d
    – Lukas
    Commented Feb 2 at 13:59
  • Check the /etc/cron.daily directory. On my system it includes file for logrotate. In /etc/logrotate.d you may find the config files for logrotate. Check particularly "postrotate" sections in these files for what is done after logs are rotated. It often includes restarting of various services. This may refer to various other scripts, you need to analyze the code.
    – raj
    Commented Feb 2 at 14:13
  • Hello @raj, I just posted an answer. There is a file which does exactly this. It changed from "the postfix mail system is already running" to a complete restart. I am unsure where this file is from and why it is acting now differently (I do not have the logs from before this time anymore, but it is from there.
    – Lukas
    Commented Feb 2 at 14:17
  • "This error keeps happening even after a restart of the server daily at 6:25." what error are you seeing? Just a "killed with signal 15" is not an error. The error would be more like that dovecot or postfix didn't restart because of something. Maybe Paul's Notes like this notes.palsch.de/2018/08/… were followed in the past to have the proper certs done to your server which matches exactly what you have found below?
    – Terrance
    Commented Feb 2 at 15:12

1 Answer 1

1

This is the intented behaviour for the System. In /etc/cron.daily/ is a file called reload-dovecot-postfix-ssl which was added while configuring the automatic LetsEncrypt-SSL updating-routine.

The script is from a tutorial as following. Following this script it restarts the services daily.

#!/bin/bash
systemctl restart dovecot.service > /dev/null
systemctl restart postfix.service > /dev/null

I suspect, that the Message "the Postfix mail system is already running" was changed after a Server reboot and thus showing the correct restart message now.

4
  • To find the package a file is installed from, if it is actually from a package, you can do dpkg-query -S /path/to/file
    – Daniel T
    Commented Feb 2 at 14:24
  • @DanielT, it gives me dpkg-query, no path found that matches /etc/cron.daily/reload-dovecot-postfix-ssl. I guess that leaves the question open where this is from. I did not create it.
    – Lukas
    Commented Feb 2 at 14:28
  • @Lukas files like that may be created on the fly by a package's control files (.preinst / .postinst) rather than being provided as files "belonging to" the package Commented Feb 2 at 21:20
  • 1
    As per my comment above in the question the file came from notes.palsch.de/2018/08/…
    – Terrance
    Commented Feb 2 at 22:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .