Re: [Exim] Conditional Catchall - Exim4

Pàgina inicial
Delete this message
Reply to this message
Autor: Tim Jackson
Data:  
A: exim-users
Assumpte: Re: [Exim] Conditional Catchall - Exim4
Hi Stuart, on Wed, 28 Apr 2004 12:47:30 -0500 you wrote:

> I am using Exim4 and I want to setup a catchall so that messages sent to
> an unknown user will be forwarded to a specified user.

...
> I also want to add a condition that this will not happen if the local
> part matches a file listing banned users.


As with many things with Exim 4,

a) this is very easy, but

b) it depends on how you have things set up...I mean, you could be doing
anything from "traditional" handling of a single local domain or set of
domains via /etc/aliases or equivalent, to complex virtual hosting with
userlists in text/DBM files or a database.


However, the principles will be something along these lines:

- a lookup containing "*", e.g. "lsearch*" to match the wildcard (*)

- a lookup (perhaps a separate router, before your "main" one) which
checks $local_part against whatever file it is that has the "bad
usernames" in.


Bear in mind when you're doing this that wildcarded local parts are
generally a very bad idea these days from a spam/virus point of view if
nothing else. You just end up giving malware a bigger "surface area" to
attack. So, best avoided where possible.


Tim