Re: [exim] Filtering incoming mail.

Pàgina inicial
Delete this message
Reply to this message
Autor: Tim Jackson
Data:  
A: exim-users
Assumpte: Re: [exim] Filtering incoming mail.
On Thu, 5 Jan 2006 17:33:10 -0500
"Raymond Monette" <RMonette@???> wrote:

> Essentially, before the mail is routed to Domino,
> I want to do a lookup from a text file containing a list of company
> users and if the incoming message is destined to a user NOT on the
> list, then I would like to stop it outright, not have it bounce back
> or anything.


I would do this in your routers (because this is routing, and routing
decisions should be done in routers not ACLs - consider mail
originating locally). As long as you have a "verify = recipient"
somewhere in your ACLs this will feed back up to the SMTP stage.

Insert this at the top of your routers:

userlist_domains:
  driver = redirect
  allow_fail
  domains = example.com : example.net
  data = ${lookup{$local_part}lsearch{/etc/exim/userlists/$domain}\
                 {$local_part@$domain}\
                 {:fail:Unknown user}}


in the above example:

- "example.com" and "example.net" are the domains for which you have a
local user list

- the userlists are stored in a file called /etc/exim/userlists/
[domain] e.g. /etc/exim/userlists/example.com

- the userlists are a plain text file with one user per line, e.g.

fred
joe
bob
mary



Tim