cPanel blocking incoming e-mail before EXIM rewrite or router

jasgot

Well-Known Member
Mar 2, 2004
87
11
158
I am writing an EXIM rewrite and router. cPanel is denying the incoming message before EXIM starts processing. I have incoming mail to a non existent user and I need to rewrite the header to properly route the message, but cPanel is blocking it before EXIM sees it.

It is this setting that is doing the denyal:
Default Address Maintenance
Send all unrouted email for the following domain:

Discard the email while your server processes it by SMTP time with an error message.
Failure Message (seen by sender)


How do I allow EXIM to process the mail without cPanel interfering?

Edited for typo.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,558
2,610
363
cPanel Access Level
Root Administrator
I confirmed with the team there isn't a way to stop those checks. However, in the cPanel >> Default Address, there is an option to forward the unrouted mail to another location, or you can pipe it to a program for further processing. Would one of those options work well for you instead?
 

jasgot

Well-Known Member
Mar 2, 2004
87
11
158
After using exim -d -bt to watch for the fail, I see it is failing at virtual_aliases in exim.conf
I confirmed with the team there isn't a way to stop those checks. However, in the cPanel >> Default Address, there is an option to forward the unrouted mail to another location, or you can pipe it to a program for further processing. Would one of those options work well for you instead?
I suppose piping it to a script may work. It just seems easier to maintain if it were a router and transport.
 

jasgot

Well-Known Member
Mar 2, 2004
87
11
158
New information and new issue.

The problem was that I was editing the exim.conf and using basic editor save button to save, recompile, and restart.

I am now using the advanced editor and it partially works.

I can rewrite the to: address all day long, but I cannot rewrite the From: address at all.

Is cPanel preventing the From: address from being rewritten?

Usinf Exim -brw show exactly what I want, but it looks like cPanel is ignoring it for the From and Reply to.
 

jasgot

Well-Known Member
Mar 2, 2004
87
11
158
Ha! I found the problem. In the Exim.Conf file I found this:

# discover_sender_information is not included
# because from_rewrites are not enabled

Now to enable them!
 
  • Like
Reactions: cPRex