Is it possible in cPanel/WHM to direct mail traffic for certain domains to one port and for other domains on another port?
Is it possible in cPanel/WHM to direct mail traffic for certain domains to one port and for other domains on another port?
AFAIK, cPanel/WHM doesn't offer any such feature.
Can you elaborate on what you mean by "mail traffic." Are you talking about SMTP, IMAP, POP3, Webmail ...? By "another port" do you mean plain text vs. SSL port or something else?
If you can provide some information on what you intend to accomplish, perhaps we may be able to help you.
Thanks for asking and sorry for the lack of details.
I meant incoming mail for domains on a cPanel VPS. The problem I am facing at the moment is that some clients who take hosting with me use a third party spam filtering service. However, they also find spammers bypassing the filtering by sending directly to their mail servers. To avoid this, they ask me to lock down incoming mail for their domains to accept incoming email only from the specific IP addresses that do the filtering.
The issue is that, if I do this, other domains on the VPS will have their incoming mail blocked. I was wondering if there might be a way in Exim to specify certain domains (the ones using the filtering service) to use specific ports - meaning, Exim would run on those additional ports - and have the non-filtering domains run on the regular Port 25.
I could then set a rule in the firewall to deliver incoming mail for specific domains to the additional port on which Exim is running. Ideally, it would be great to do this in Exim itself instead of the firewall.
Last edited by meeven; 04-28-2009 at 11:25 AM. Reason: addition
You could easily have Exim running on an additional port by going to WHM -> Service Configuration -> Service Manager and enabling the option for "exim on another port."
However, the trick would be to filter the messages such that incoming mail over port 25 do not reach the client's email accounts.
Something you may want to keep in mind is some servers do sender verify checks to curb spam. If you block port 25 traffic, sender verify could fail and messages sent from emails where port 25 is blocked may fail to reach their destination.
Thank you, cPanelDavidG
I got some help on the exim mailing lists and here is the suggested ACL:
I checked the Exim configuration editor and there is only one line that contains acl_smtp_rcpt. The bigger problem is that I don't know the correct syntax for making this suggested ACL work - I can't possibly put those three lines into the Exim config editor and hope for it to work. It's more likely to bring the whole server crashing down.What about something like:
deny
message = only accept messages from certain servers
domains = LIST of DOMAINS or a database or a file
hosts = ! LIST of IPs or a database or a file
Basically, you have a list of domains that use each 3rd party filtering
service. You have a corresponding list of the IPs used by that 3rd
party filtering service. Deny if the recipient is on a 3rd party
service but the incoming IP is not in the IP list for that 3rd party
service.
The list could be in a flat file or a database or if it's short enough,
you could just put it in the exim config. How you store the list would
determine how you query it in the ACL.
BTW, you would put these ACLs in the acl_smtp_rcpt section.
Is there someone here who could fill out this ACL for me? Or is this something for which I can submit a ticket to cPanel ?