Re: [exim] Mimicing Postfix configs?

Pàgina inicial
Delete this message
Reply to this message
Autor: Dave Evans
Data:  
A: exim-users
Assumpte: Re: [exim] Mimicing Postfix configs?
On Tue, Sep 22, 2009 at 06:26:19AM +0200, Jan Johansson wrote:
> >$local_part@$domain is what you want.
>
> Well, yes, but how do I combine that in a router condition? I want to
> set
>
> local_parts = lsearch;/.....
>
> in the router.


> Basically, I want a router that will read a file of which domains to be
> handled (that was easy with lsearch), but then I have a second file
> containing the "valid" email-adresses.


Probably not the most efficient, but possibly one of the simplest, ways of
doing this is as follows:

- create lists of local-parts, one per domain, e.g.
/etc/exim4/domains/example.com
/etc/exim4/domains/example.net
e.g. each file would contain lines like "bob", not "bob@???"

- in the router do something like "local_parts =
lsearch;/etc/exim4/domamains/$domain"

- if you like you can also change the way that PrDomains is defined (
dsearch;/etc/exim4/domains ) and thus do away with the /etc/exim4/PrDomains
file (assuming nothing else is using it).

Test. (above is untested, hopefully I'm not half-asleep and talking nonsense).
Make sure that valid users get routed correctly. Make sure that /invalid/
users fail to route. And make sure that acl_smtp_rcpt includes "require
verify = recipient".

Regards,

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey