[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: catch-all in /etc/aliases



On Fri, Oct 15, 2004 at 10:08:49AM +0100, James Cummings wrote:
>On Thu, 14 Oct 2004 17:02:06 +0100, James Cummings
><cummings.james@gmail.com> wrote:
>> Hi there,
>> 
>> I'm using debian unstable and exim4 and forwarding a bunch of
>> mail on for another system using /etc/aliases
>> 
>> Firstname.Lastname: Firstname.Lastname@other.system.com
>> Firstname1.Lastname1: Firstname1.Lastname1@other.system.com
>> etc.
>> 
>> Is there a way to put a catch-all address in so that any
>> mail I've not explicitly matched can be sent to  foo@another.system.com  ?
>> 
>> I've tried just putting *: foo@another.system.com  and
>> doing @first.system.com :  foo@another.system.com
>> but that doesn't seem to work.
>
>Aha!  Replying to my own post:  For the record I have found that 
>the way to do this is...
>----------------
>Exim 4 Catchall
>Add another file in the router directory for catchall to work.
>
> hendry@bilbo:/etc/exim4/conf.d/router$ cat 950_exim4-config_catchall 
> catch_all:
>   debug_print = "R: catch_all for $local_part@$domain"
>   driver = redirect
>   data = ${lookup{*}lsearch{/etc/aliases}}
>
> hendry@bilbo:/etc/exim4/conf.d/router$ egrep hendry /etc/aliases 
> root: hendry
> *: hendry
>With other people. I have yet to figure out how to configure different
>aliases for different hosts, but I am not worried about that problem
>atm.

This is how I handle the multiple domain issue. Make a directory called
aliases.d, with each domian having it's own alias file.

data = ${lookup{*}lsearch{/etc/aliases.d/$domain}}



Reply to: