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

Currently, exim4 forwards all email at my domains to my gmail account. (And my brothers' to their accounts.) Using a split configuration, (/etc/exim4/conf.d/routers/350_exim4-config_vdom_aliases) uses (domains = dsearch;/etc/exim4/virtual), where i have a number of files, one per domain/sub-domain, with (* : as the content. (It's actually symlinked to a file with those contents.) Now, i have Cyrus and Squirrelmail installed, and i want to host my email locally, though still forward a copy of the emails to gmail.

How do i setup exim4 to deliver email to my cyrus (sasl) and forward a copy of them to gmail?

share|improve this question
up vote 0 down vote accepted

Without the structure of your config I can't say for certain how you're doing things, there's a lot of ways people can have their setup configured with Exim. Saying that, you should be able to accomplish this with the unseen option for routers.

You can find details in the manual under 15. Generic options for routers:

Setting the unseen option has a similar effect to the unseen command qualifier
in filter files. It can be used to cause copies of messages to be delivered to
some other destination, while also carrying out a normal delivery. In effect,
the current address is made into a “parent” that has two children – one that
is delivered as specified by this router, and a clone that goes on to be routed
further. For this reason, unseen may not be combined with the one_time option
in a redirect router.
share|improve this answer
Thanx. That definitely looks like the option. Currently, the router is virtual hosts: vdom_aliases: driver = redirect allow_defer allow_fail domains = dsearch;/etc/exim4/virtual data = ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual/$domain}}} retry_use_local_part pipe_transport = address_pipe file_transport = address_file – please delete me May 15 '12 at 2:01
That ${expand:} wrapper is probably a security glitch waiting to bite and should be unneeded. Also, with that driver, you should be able to just make the value of the entry be a colon-separated list of email addresses, where one is the same as the original address. Exim will avoid expanding the same value twice, so there's no loop. – Phil P May 25 '12 at 14:41

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.