Re: [exim] ACL for certain aliases

Etusivu
Poista viesti
Vastaa
Lähettäjä: Linux Solutions
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] ACL for certain aliases
> > I'm absolutely new to Exim.
>
> Welcome :-)




It's been interesting so far. I come from Postfix and inherited a EXIM
server ;-).



>
> > I'd like to write a ACL to send email to certain alias addresses from
> the
> > senders on the same domain.
> >
> > For example,
> >
> > I'd like only users from example.com to send emails to all@???
> > info@example which are aliases in /etc/aliases
>
> There will be many ways to do this, depending on your exact requirements.
> For
> example, you could have a second lookup file which names the accounts
> which
> are restricted:
>
> # in /etc/exim/restricted-aliases :
> all
> example
>
> then have an ACL which disallows non-local access to those accounts:
>
>  deny
>    domains = example.com
>    local_parts = /etc/exim/restricted-aliases
>    hosts = !+local_hosts
>    message = Some message here ...

>
> where the +local_hosts hostlist defines which hosts are allowed to address
> the
> restricted accounts.
>
> On the other hand, if you want more flexibility (multiple domains,
> multiple
> definitions of who can bypass the restriction, etc), that'll almost
> certainly
> be possible too, as long as you can define what it is exactly that you
> want.
>
> More info:
>
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECTaclconditions




Thanks for all the info. The above example doesn't work for some reason.
Here's more info ...

In exim.conf

qualify_domain is set to example.com. This is the only domain on the
server. The above rule as-is, disallows even users from example.com from
sending emails to the all@??? and info@???.

I modified the above ACL to,

deny message = You should not be sending me emails. Go away..
domains = example.com
local_parts = /etc/exim/restricted-aliases

I want user1@???, user2@??? ..and so on to send emails to
all@??? and info@???. user1@??? should get
the deny message.

In /etc/exim/restricted-aliases i have,
all
info

My /etc/aliases has

all: user1, user2, user3, user4
info: user1. user4


Is local_hosts line necessary? I'm sure I'm missing something or have
misunderstood :-)

Joey