Rewriting the “From” address with Exim (for local users)

Lately, the mail relay I use stopped accepting the “From” my Debian system was sending by default for the cron jobs results, something like:

I don’t have any MX records for “”, nor a mail server for it, even locally.

Exim is configured to relay all non-local emails to a smart host, and I had some entries in


to forward the emails for root and some other users to my real mailboxes, e.g. for cron jobs. That worked fine for the “To” field, but not the “From”.

I started to look at Exim rewriting rules, but there is a much more straightforward solution. Exim supports the /etc/email-addresses file, that does cover exactly this use case. Check it out:

man etc-email-addresses


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s