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

I'm using file-based configuration (no dbm, nor sql) for my few virtual domains/users with exim/dovecot.

My configure contains next routers:

  driver = redirect
  condition = ${if exists{/home/mail/${domain}/${local_part}/filter}{yes}{no}}
  domains = dsearch;/etc/mail/virtual
  router_home_directory = /home/mail/${domain}/${local_part}
  user = mailnull
  group = mail
  file = /home/mail/${domain}/${local_part}/filter
  file_transport = virtual_address_file
  pipe_transport = address_pipe



so, if exists /home/mail/ the exim will use it.

One of my users asking to copy his all incoming emails to his gmail account too. Because

  • my config doesn't have .forward checks for virtual users
  • and the aliases for virtual domains are checked only after the virtual_user delivery route, so only if the given address has not virtual mailbox
  • but the above virtual_filter is the first rule in the routers

looking for a way how to copy all incoming email for this one user using his filter.

I tried the

unseen deliver <>

but this caused only fowrard to all emails to gmail without the delivery to dovecot, and i want the both: 1.) via the virtual_user route deliver as standard, and 2.) send a copy of the message to

Any suggestion?

share|improve this question

Just figured out, it is enough add to:


the next two lines

unseen noerror deliver <>
deliver <>

so, deliver one copy to gmail and another one to normal mailbox.

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.