Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Cron sends emails with the "From" header always set to "From: root@example.com (Cron Daemon)" for all users, even though the envelope address (seen in the "Delivered-To" header in received email) is the user's correct email address. Is it possible to create a header rewrite rule which fixes the "From" header for outgoing emails?

share|improve this question
up vote 1 down vote accepted

Create a file in /etc/exim4/conf.d/rewrite, for example 10-cron-rewrite, with the contents:

root@ETC_MAILNAME   "${if match {$header_from:}{.*(Cron Daemon).*} {$sender_address}fail}"  f
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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