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.

I'm running the package exim4-daemon-light on Debian Lenny to send emails from my website. My intention is to redirect emails to an specific mailbox on test environment.

The example on documentation is not working for me. I tried this rewrite rule (Located in /etc/exim4/conf.d/rewrite/31_exim4-config_rewriting):

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

And reload the configuration:

vanilla:/etc/exim4/conf.d/rewrite# invoke-rc.d exim4 reload
Reloading exim4 configuration files: exim4.

And test with as root:

# exim -brw someone@random.hidden

The result is:

  sender: someone@random.hidden
    from: someone@random.hidden
      to: someone@random.hidden
      cc: someone@random.hidden
     bcc: someone@random.hidden
reply-to: someone@random.hidden
env-from: someone@random.hidden
  env-to: someone@random.hidden

It seems that the rewrite rule is not been loaded. Even when I write some garbage in the file nothing happens:

### rewrite/31_exim4-config_rewriting
#################################

# This rewriting rule is particularily useful for dialup users who
# don't have their own domain, but could be useful for anyone.
# It looks up the real address of all local users in a file
.ifndef NO_EAA_REWRITE_REWRITE
*@+local_domains "${lookup{${local_part}}lsearch{/etc/email-addresses}\
                   {$value}fail}" Ffrs
# identical rewriting rule for /etc/mailname
*@ETC_MAILNAME "${lookup{${local_part}}lsearch{/etc/email-addresses}\
                   {$value}fail}" Ffrs
.endif

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

asdfasdfasdfasdf
share|improve this question
    
Can you check to see if your rewrite rule is being saved on the ` /var/lib/exim4/config.autogenerated`. If not you are putting them on the wrong place. –  coredump Feb 14 '11 at 15:40
add comment

2 Answers 2

Look in /etc/mailname Info in this file can conflict, causing rewrite not to work.

share|improve this answer
add comment
up vote 0 down vote accepted

I edited /etc/exim4/exim4.conf.template instead the files inside conf.d directory. Now the configuration is working as expected.

share|improve this answer
add comment

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.