Fedora 42: cron doesn't send emails

Hello,

Since upgrading three servers to F42 I haven’t been getting a emails from cron.

Postfix works, I can still use curl to send emails in them and, according to postfix logs, cron doesn’t even try to send the emails.

But I don’t see any errors in cron logs about it.

The MAILTO tag is in crontab the same way it has always been and I still get mails from a server that’s still in F41.

Has cron behaviour been changed?

Thanks.

It looks like it will change yes:

The problem is that ‘/usr/sbin/sendmail’ does not create a a symlink to ‘/etc/alternatives/mta’

Doing that and rebooting solved the issue.

1 Like

I post a bug which shows your solution you posted.

It also looks like that the install script has to be adapted to make the change from /sbin to /bin.

It looks like that this bug report addresses this:

Myself here, who is trying to get systemd-cron into fedora.

It is still in my copr, awaiting a review.
You might like to use it.

However, nothing is changing unless you decide to do so on your installation.
This issue is not related to systemd-cron, well, nothing has changed.

systemd-cron (specifically systemd-crontab-generator in it) is a systemd generator which parses the files a traditional cron daemon would, and writes systemd timer and service unit pairs for equivalent cronjobs.

It apparently does support using sendmail just like a traditional cron daemon (haven’t tested it myself though).

If you like it, do use it.

1 Like

It wasn’t working for me after installing the postfix update, but I hadn’t rebooted yet. I restarted cron.service and, after that, my at job test worked. Might save someone a reboot.