Catch-All Email

Pamela 6 years ago updated by Quinn 5 years ago 6
I am trying to configure a catch-all email account; however, after I configure it and try emailing it, I get
550 Unrouteable address

For the email address, I am using *@domain.com. Normal email addresses like example@domain.com work just fine. It is only the catch-all email address that is not working.

Any ideas?

you should try Custom routers on mail section >> advanced tab
just use this for custom routers
debug_print = "R: catch_all for $local_part@$domain" 
driver = redirect 
domains = MYDOMAIN.com 
Thanks a lot, Amirhossein! I spent several hours trying to figure this out, but couldn't.

Your solution works perfectly.

Hey Amirhossein your code helped me out a lot! Thanks!

Could you just help me a little further ?

I'm hosting multiple domains and would like to redirect emails for different domains to different email addresses.


1) Invalid-email@x.com --> valid-email@x.com

2) Invalid-email@y.com --> valid-email@y.com

How can I do this ?

Thanks, works great, but is it possible to enter exceptions to the catch-all? Say I want to block anything coming to noreply@domain.com

Should have looked a bit better before posting, and appear to be unable to edit/delete my previous post.

The solution is quite easy: add

local_parts = !/etc/exim4/domain.com.blacklist

to the custom router, then create the file /exc/exim4/domain.com.blacklist and add the to blacklist addresses there, each one on a new line. e.g.

# cat /etc/exim4/domain.com.blacklist




Ajenti's built in text editor with a bookmark to the file makes adding blacklists items convenient.