Exim and marking catchall emails (in the header)


Active Member
Jan 21, 2010
cPanel Access Level
Root Administrator
Ok lets say I have [email protected] and [email protected] and they're both mailboxes.

The catchall's goes to [email protected]

If someone sends an email to [email protected] I want something along this (haven't checked this script works!!):

if ($recipients: contains "[email protected]"
or $recipients: contains "[email protected]") then
headers add "X-Mail: Mailbox"
headers add "X-Mail: Forwarder"
headers add "X-CA: Yes"

The problem is I dont want to have to add mailboxes to tell the script which mailboxes are mailboxes or if they are fowarders/catchall's etc etc

Anyone with a far better knowledge of exim have any pointers?

The aim is to have the fact the email was caught was because it was a catch all (and most likely to be junk, but i don't want it in my inbox, with the header info, it can be put into a lower priority folder, leaving my inbox to be stuff sent to [email protected]), and i'd rather not have a catchall mailbox which i'll forget to check.