Re: [exim] Filtering incoming mail.

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Raymond Monette
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Filtering incoming mail.
Ok. Sounds good, Ill give that a shot!!

Thanks

R

Raymond Monette
Manager, Information Technology
Language Works
1123 Broadway
New York, NY 10010
646-205-2127







Tim Jackson <lists@???>
Sent by: exim-users-bounces@???
01/10/2006 04:10 AM

        To:     exim-users@???, "Raymond Monette" 
<RMonette@???>
        cc: 
        Subject:        Re: [exim] Filtering incoming mail.



On Mon, 9 Jan 2006 19:24:18 -0500
"Raymond Monette" <RMonette@???> wrote:

Discussions on list, thanks.

> Ok, I guess with the back and forth, Im getting a bit confused...


Sorry. Don't worry about it; with Exim's flexibility comes the ability
to do one thing a number of different ways and unfortunately there is
rarely a "one size fits all" solution.

> Should I put this code blurb as my first router?


Yes, I would use Tony's one which is (just to be clear):

reject_bad:
driver = redirect
domains = +userlist_domains
local_parts = ! lsearch;/etc/userlists/$domain
data = :fail: $local_part not known at $domain
allow_fail

> Also is, "/etc/userlists/$domain" representative of a file? This
> would be the file where my local parts are?


Yes, just a text file with one local part per line. When you actually
create the file, you should call it according to the destination
domain, e.g. if you are filtering mail for example.com, call it /etc/
userlists/example.com. The "$domain" in the above router is
"expanded" (replaced) in real-time by Exim with the domain that it is
currently processing.

> As far as I remember, I dont have a file by that name...


No, it's just something I made up. You can put the file anywhere you
want, and call it anything you want. In this case I suggested /etc/exim/
userlists, but it will work equally well anywhere else as long as
permissions etc. are OK.

As you might be appreciating from this example, rather than offering
specific options to do specific things, Exim offers a generic framework
of things like lookups (looking up stuff in files), variables (like
$domain and $local_part in the above example) and string expansions
(which include operators that can transform strings, and regular
expression matching). What you do with these is up to you and hence why
there is often more than one way to do something. Tony's suggestion
above does precisely the same as my original one, it's just a bit
easier to read. Although you don't *need* to, it would be good to
understand what it's doing; if you don't, feel free to ask.


Tim

P.S. if you haven't got the Exim book (http://www.uit.co.uk/exim-book/)
you might want to: it's easier to read than the online documentation
which more like reference material.

--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/