We have several nearly identical servers with a fairly classic server-NN naming convention, each running cron jobs that we like to monitor via email. There are is a group of users, who receive the email messages from these cron jobs and they all come from:

From: "(Cron Daemon)" <user-x@server-NN.brandle.net>

where user-x is invariant but server-NN changes with each server. I'd like for the emails to come from:

From: "Cron Server-NN" <user-x@server-NN.brandle.net>

I've tried setting the 'full-name' for 'user-x' but that had no effect. There has to be a way to handle this more cleanly.


Most recent versions of cronie can use the MAIFROM variable to set the envelope sender address. This obviously requires that your distribution uses cronie to provide cron.

On distribution non supporting MAILFROM, you can use a shell script to obtain the required behavior. In this case, it will be the shell script that sends the email, rather than cron itself.

For more information, please read here and here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.