I use a server to forward email sent to various domains to the appropriate users' main inboxes. I've got a fairly standard exim installation with the following major change to the configuration:

domainlist local_domains = lsearch;/etc/virtual/domains.list

    driver = redirect
    domains = lsearch;/etc/virtual/domains.list
    data = ${lookup{$local_part}lsearch{/etc/virtual/domains/$domain}}

    driver = redirect
    domains = lsearch;/etc/virtual/domains.list
    data = ${lookup{postmaster}lsearch{/etc/virtual/domains/$domain}}

The file /etc/virtual/domains.list contains a list of all the domains my server handles mail for, and /etc/virtual/domains/ contains files names according to the domain they pertain to, like /etc/virtual/domains/example.com. Each of those files is formatted like so:

postmaster: [email protected]
someuser: [email protected]
otheruser: [email protected]

...and so on. This configuration works as intended. If the user is found in /etc/virtual/domains/example.com, mail is forwarded to the address given, otherwise it defaults to the "postmaster" address as a catch-all.

I'd like to be able to specify multiple destination addresses so that, for example, mail sent to [email protected] would be forwarded to both [email protected] and [email protected]. I tried using a comma-separated list and listing the user twice with different addresses, and in both cases it only forwarded to the first address.

Does lsearch provide a way to do something like this already? If not, is there a way I could modify my configuration to allow it? Any help would be much appreciated.

  • You should be able to do [email protected],[email protected], that should work.
    – Todd Lyons
    Commented Apr 23, 2014 at 20:30
  • @Todd I did a little more testing, and it turns out you're correct. I was using 2 test addresses that both forwarded to the same Gmail account, and didn't realize Gmail filtered out the duplicates, so I only saw one. If you turn your comment into an answer, I'll go ahead and accept it.
    – Dan
    Commented Apr 23, 2014 at 22:11

1 Answer 1


The process of expanding an alias to a different email address is not limited to a single address. Exim accepts a comma separated list and will route each email address separately. The format that you tried where it was comma-separated should work.

usera: [email protected],[email protected]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .