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:

root@mydomain.fr

I don’t have any MX records for “mydomain.fr”, 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

/etc/aliases

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

.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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