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 have a debian server which uses exim4 as mta and courier-imap to allow users to read main. Mail is usually either delivered locally or an aliases file is used to forward mail to another adress. e.g.

# Local account: foo receives mail for foo@domain.com
somealias: bar@otherdomain.com
otheralias: foo, bar@otherdomain.com # Deliver both locally and remote

We now have an emailadres which we would like to be accesible through imap, but also be forwarderded to another e-mail address. This can be achieved by renaming the account and using the aliases file, but is this also possible with the local account having the same name? Renaming the account would require quite some reconfiguration in several systems.

# buz@domain.com needs to be de delivered to both baz@otherdomain.com and the "buz" local account
# Possible solution, rename buz account to buzdummy, but this would case other problems
buz: baz@otherdomain.com, buzdummy
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Just do what you start in alias file - without renaming:-)

buz: baz@otherdomain.com, buz

If alias is expand to self then it is not expanded in loop again but skipped, so mail be forwarded outside and delivered locally. (See Exim documentation ).

share|improve this answer
    
That obvious, thanks –  dtech Mar 23 '13 at 17:06

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.