Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

*@*.hidden $1@hidden.com fsrF

The test results are as expected

xeross@Mainframe:~$ sudo exim -brw someone@random.hidden
  sender: someone@hidden.com
    from: someone@hidden.com
      to: someone@random.hidden
      cc: someone@random.hidden
     bcc: someone@random.hidden
reply-to: someone@hidden.com
env-from: someone@hidden.com
  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) [192.168.0.24] P=smtp S=535 id=1289689918.                                 160185.6530.nullmailer@InternalServices.hidden.local
2010-11-14 00:14:42 1PHPIr-0001rz-Iw ** xeross@theelitist.net R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after MAIL FROM:<xe                                 ross@InternalServices.hidden.local> SIZE=1571: host smtp.isp.nl [212.54.42.9]: 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 smtp.isp.nl [212.54.42.9]: 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

2 Answers 2

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 ? –  Xeross 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

 
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.