Linux Cron: Customization of Email Subject isn't implemented

Question: How to customize cron emails' subject?
Answer: It's hardcoded. That's it.

The only one thing is configurable: MAILTO.
Content-Type is text/plain. Charset is taken from current locale.
Email subject is built using commanline configured in /etc/crontab or just hostname (in case of anacron)
If you really need different subjects at least with prefixes "ALERT" or "WARNING" - feel free to send mail through your own way.

This is how it's hardcoded in crond:

Source code: src/do_command.c, line 446

This is how it's hardcoded in anacron:

Source code: anacron/runjob.c, line 274

No comments:

Post a Comment