[Wolves] Exim - catchall email for one domain
Andy Smith
andy at lug.org.uk
Thu Jan 17 13:07:21 GMT 2008
On Wed, Jan 16, 2008 at 01:51:06PM +0000, Wayne wrote:
> I have a exim 4 server running the mail for a handfull of domains and
> would like to catch ALL mail for just one of them.
> Any idea how to do this?
Are you sure you even want to? It tends to be an incredibly bad
idea. The first time some spamming bot does a dictionary attack on
your domain, you will get EVERY email it tries to send. Arguably
worse still it will record that all those addresses were valid and
deliverable and sell that information to other spammers, so you will
get an ever-multiplying amount of spam.
If you did want to do it then you could do something like this:
vdom_aliases:
driver = redirect
domains = dsearch;/etc/mail/virtual
data = ${expand:${lookup{$local_part}lsearch*@{/etc/mail/virtual/$domain}}}
no_more
Put that above router in your config at the point you want it to be
applied (routers are evaluated in order) then you can create a file
in /etc/mail/virtual per domain. So for example, if you had the
domain example.com that you wanted to treat this way, you'd create
/etc/mail/virtual/example.com with content like the following:
foo: foo at anotherexample.com
bar: bar at somewhereelse.com
That would make foo at example.com and bar at example.com redirect to the
given addresses. If you, against my advice, wanted a catch-all
you'd add a line:
*: some at poor-bugger.com
You will also have to make sure in your ACLs that all domains in
/etc/mail/virtual/ are considered local. If you already have some
variable that has a list of them, then appending:
: dsearch;/etc/mail/virtual
to that would do it. For example on Debian I have:
domainlist local_domains = MAIN_LOCAL_DOMAINS : dsearch;/etc/mail/virtual
in /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs
Cheers,
Andy
--
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/wolves/attachments/20080117/cacb0a3f/attachment.bin
More information about the Wolves
mailing list