Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

When testing the following rewrite rule (Located in /etc/exim4/conf.d/rewrite/31_exim4-config_rewriting)

*@*.hidden $ fsrF

The test results are as expected

xeross@Mainframe:~$ sudo exim -brw someone@random.hidden
      to: someone@random.hidden
      cc: someone@random.hidden
     bcc: someone@random.hidden
  env-to: someone@random.hidden

However when sending a mail from a machine in the LAN network other than the one running Exim (I have the node I'm testing with configured with nullmailer), the headers don't get adjusted resulting in.

2010-11-14 00:14:37 1PHPIr-0001rz-Iw <= xeross@InternalServices.hidden.local H=(InternalServices.hidden.local) [] P=smtp S=535 id=1289689918.                                 160185.6530.nullmailer@InternalServices.hidden.local
2010-11-14 00:14:42 1PHPIr-0001rz-Iw ** R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after MAIL FROM:<xe                                 ross@InternalServices.hidden.local> SIZE=1571: host []: 550-Verification failed for <xeross@InternalServices.hidden.local>\n550-                                 Unrouteable address\n550 Sender e-mail address invalid / Afzender e-mail adres bestaat niet
2010-11-14 00:14:42 1PHPIw-0001s2-Rd <= <> R=1PHPIr-0001rz-Iw U=Debian-exim P=local S=1689
2010-11-14 00:14:43 1PHPIr-0001rz-Iw Completed
2010-11-14 00:14:48 1PHPIw-0001s2-Rd ** xeross@internalservices.hidden.local R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server afte                                 r RCPT TO:<xeross@InternalServices.hidden.local>: host []: 550 Recipient e-mail address invalid / Ontvanger e-mail adres bestaat                                  niet
2010-11-14 00:14:48 1PHPIw-0001s2-Rd Frozen (delivery error message)

Yet they seem to get rewritten just fine when sending from the exim box (Even without this rewrite rule as I already configured it with the debian config thing).

Any idea what's wrong ?

share|improve this question

Is it possible you lan clients are not sending through the exim box correctly.

The clients send mail directly?

The clients email is only forwarded (not altered)?

Perhaps your rule is not applied on the mta queue?

Check this and let me know :)

share|improve this answer
The clients have the exim box set as smarthost and the above log is from the exim box. So it seems for some reason the rewrite rules are indeed not applied, is there any config setting that would enable them ? – Not Available Nov 14 '10 at 10:43
up vote 0 down vote accepted

The rewrite wasn't working because the Nullmailer box somehow sent mail as coming from InternalServices.hidden.local, it turned out that this was caused by /etc/mailname containing an old domain name.

We have updated the box and it all works as intended now.

share|improve this answer

Your Answer


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.