Re: [exim] Mail to All users in my domain

Top Page
Delete this message
Reply to this message
Author: Christian Schmidt
Date:  
To: exim-users
Subject: Re: [exim] Mail to All users in my domain
Hello Magnus,

Magnus Holmgren, 12.09.2007 (d.m.y):

> On Wednesday 12 September 2007 09:40, Adrian Chapela wrote:
> > I want to know if exists something group or rule to send a message to an
> > address and then re-send this message to all users of a domain. I want
> > to make a rule to accept this message only from one IP. Could be this
> > possible ??
>
> You mean you want a particular address to be an alias for all addresses in a
> domain, like "everybody@??? -> adam@???, bea@???,
> carl@???, ...", except that everybody@??? is only recognized
> if the mail comes from a particular IP address?
>
> That can be done, but you need to somehow tell Exim who "all users" are. How
> to do that depends on how you currently define valid users. A simple example
> for a database setup:
>
> everybody_router:
>   driver = redirect
>   condition = ${if match_ip{$sender_host_address}{127.0.0.1:192.168.42.17}}
>   local_parts = everybody
>   data = ${lookup mysql{SELECT username FROM user INNER JOIN domain \
>                                           ON user.domain = domain.id \
>                          WHERE domain.name = '${quote_mysql:$domain}'}}


I wouldn't make this "alias" permanent.
Instead of using a database-driven solution, you could also put all
your local parts in an extra text file and temporarily incude this in
your regular aliases file.

Gruss/Regards,
Christian Schmidt

-- 
Always the dullness of the fool is the whetstone of the wits.
        -- William Shakespeare, "As You Like It"