Re: [Exim] Specifying mulitple domains per user?

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: James O'Gorman
CC: exim-users
Subject: Re: [Exim] Specifying mulitple domains per user?
James O'Gorman wrote:
> Hi all,
>
> I'm pretty sure this (or something like it) has been covered before, but
> I didn't really understand the answers in the documentation or in the
> list archives.
>
> Basically, a friend and I run our own mailservers for our domains. He
> uses sendmail, I use exim (as per the defaults with our respective
> RedHat and Debian systems). What I've noticed with sendmail is that he
> can specify in /etc/mail/virtusertable something like:
>
> someone@???    bob
> person@???  jim
> anotherperson@??? jim
> some@???    some@???

>
> Is there any way to do similar in exim? /etc/aliases just seems to
> specify "user" (as in user@domain) to go to "local-part" - doesn't help
> with multiple domains!
>
> I tried (in /etc/aliases):
>
> *: james
>
> (after modifying /etc/exim/exim.conf so that search_type is lsearch*
> instead of lsearch)
>
> But then bob@??? would get delivered to james instead of
> local-user bob, which isn't what I want at all!
>
> Is there any way of doing this (easily) in exim at all? I'm currently
> contemplating moving to sendmail because I just can't see how to do it!


Yes, it's easy

You'll need a director like this one (just out of my mind, I didn't
touch exim3 since more than a year)

virtualusers:
   driver = smartuser
   new_address = ${lookup {$local_part@$domain}\
                    lsearch*@{/etc/exim/virtualusers}}


Nico