Re: [Exim] alias file for multiple domains & rejecting users…

Top Page
Delete this message
Reply to this message
Author: John Masinter
Date:  
To: exim-users
Subject: Re: [Exim] alias file for multiple domains & rejecting users with *@xyz.com
I finally solved this. I think this should be added to the FAQ.

Question:
"How to I have 'bob@???' receive mail, and 'bob@???' reject mail?"

Answer:
0) Removed the localuser director and local_delivery transport.
This will stop mailbox delivery for all system shell accounts/passwd entries.

1) Add this line to the address_file transport, to set the uid:
user = $local_part

2) For local users@domains who you do want to receive mail in their mailbox
add an alias for each as follows:
bob@???: /var/mail/bob

3) To reject all others for this domain, follow all 'one.com' aliases with:
*@one.com:    :unknown:


John Masinter wrote:
>
> Hi! I've read the manual and searched the mailist archive to no avail.
> Any help would be greatly appreciated.
>
> I run exim with multiple domains, and use a single alias file for all
> domains. I have a local shell account and mailbox on my system for 'bob'.
> I want bob to get mail at 'bob@???' and reject mail to 'bob@???'
> In my configure file I have:
>
> system_aliases:
> driver = aliasfile
> file = /etc/aliases
> search_type = lsearch*@
> include_domain = true
> file_transport = address_file
> pipe_transport = address_pipe
>
> In my aliases file I have:
>
> bob@???:    bob
> *@one.com:      :unknown:
> ...<skip a few lines>...
> tim@???:    tim
> jim@???:    jim
> *@two.com:      :unknown:

>
> But mail to 'bob@???' still gets put in bob's mailbox.
> Why? What did I miss? It seems like the existence of a local
> user/mailbox overrides the '*@two.com' catch all.
>
>                               ,,,
>                              (oo)
>   ----------------------o0Oo-(_)-oO0o-----------------------
>   |    John F. Masinter      Total Business Computing Inc. |
>   | Voice: (770) 886-9100           Fax: upon request      |
>   | mailto:john@totalb.com        http://www.totalb.com    |
>   |     P.O. Box 88584               Atlanta, GA 30356     |
>   ------------------------ooO--Ooo--------------------------

>