In Ubuntu and other distros I use crontab for maintenance scripts, and I get notified of errors by email. Basically this is what’s needed (as simple example):
The user’s crontab:
$ crontab -u some-user -l
*/1 * * * * /usr/bin/echo "Be alert!"
The user’s alias:
$ grep 'some-user' /etc/aliases
some-user: admin@some-domain.com
I’m having a very hard time trying to get this working in IPFire. The mail setup in the GUI works fine.
The file /tmp/test gets the date every minute. And the second command should send an email, but nothing happens.
There is nothing in /var/log/mail or /var/log/messages.
I already checked www.ipfire.org - fcron
The commands are being run, but no email is being sent. Not even to the running user or root.
Examples that might help are in the sections labelled
Example 2-1. Some examples of lines based on elapsed system up time Example 2-2. Some examples of entries based on time and date
You will need to understand about the use of options in fcron and whether they need to start with @, & or % depending on the type of time command being run. If no options are being defined then @, & or % are not needed.
I have not used the fcron mail commands myself so cannot help with explicit suggestions.
If your are referring to the use of MAILTO, it’s allowed according to documentation:
Additionally, the special variables MAILFROM and MAILTO allow you to tell fcron from/to whom it should email the command’s output. Note that these are in fact equivalent to global declarations of the options mailfrom and mailto (see below). They are used for backward compatibility, and it is recommended that you use the options mailfrom and mailto directly instead.
But anyway. I have already tried using &mailto. This is also not working: