Exim 4 pipe undefined domains


Jul 12, 2016
cPanel Access Level
Root Administrator
I am running a server with the standard cPanel mail configuration (exim, dovecot). I'm using Exim4 as my MTA.

I have set up dynamic DNS, and do not want to set up cPanel accounts for every domain that resolves to my server, which there are a lot of. I do want to be able to receive e-mails sent to those though, by running a script.

I am trying to find out how to set up a router/transport which pipes all emails sent to a domain for which there is no mailbox (or account) to a script. Basically, I want a catch-all router for all domains that resolve to my server, which would pipe the email to the script when it would normally send a "550 unroutable address" error message back. But the
addresses for which a mailbox exists, have to behave normally.

An alternative would be to pipe all incoming mail to the script, but Exim only pipes emails for which the domain is defined. I want to be able to receive mails for undefines domains as well, or be able to dynamically define those domains.

Does anyone know how to set up exim correctly? I don't


Staff member
Apr 11, 2011