Re: [exim] Restricting sending/receipt

Top Page

Reply to this message
Author: Cole Tuininga
To: Jakob Hirsch
CC: exim-users
Subject: Re: [exim] Restricting sending/receipt
On Wed, 2005-09-14 at 20:29 +0200, Jakob Hirsch wrote:
> Cole Tuininga wrote:
> >     ! domains =
> > ${lookup{$authenticated_id}lsearch{/etc/exim4/restricted_accounts}{$value}{*}}
> ...
> >     data = ${lookup{$local_part}lsearch*{/etc/exim4/aliases/$domain}}

> So /etc/exim4/aliases/ contains "bob example-bob" and
> /etc/exim4/restricted_accounts contains "example-bob

Exactly. When we initially set up the system (back in the Exim 3 days),
this was a good way to easily let separate customers have email
addresses that didn't cause a conflict with unix usernames. For
instance, company "A" might have a user called "a-bob" and company "B"
might have "b-bob". With the aliasing in place, it was easy to now
allow "bob@???" to go to the local "a-bob" user and
"bob@???" to go to the local "b-bob" user.

There's probably more elegant solutions, but this is the one we came up
with. 8)

> Looks a little strange, but this should work (unless my logic is broken):
> deny ! sender_domains = ${lookup {\
> ${lookup {$local_part} lsearch* {/etc/exim4/aliases/$domain}}\
> } lsearch {/etc/exim4/restricted_accounts} {$value}{*}}

This makes sense to me - the only problem is that we have a couple other
little rules that occasionally will modify the incoming message. Rather
than duplicating all that logic in the acl, I was hoping to let the
routers do the work, and then just use the results.

I have to say though, it's terribly impressive to me that exim is
flexible enough to reasonably easily do what I've asked so far. Kudos
again to the developers and the community of folks who have helped me
out with my config questions to date.

So, make a real effort to avoid getting sucked into all the expensive
lifestyle habits of typical Americans. Because if you do that, then
people with the money will dictate what you do with your life.
-- Richard Stallman

Cole Tuininga
Lead Developer
Code Energy, Inc
PGP Key ID: 0x43E5755D