Configure cPanel to stop relaying spam?

compudata

Registered
Jun 8, 2008
1
0
51
Scenario...
companyabc.com has a website hosted on our cPanel server. They have their own email server so the MX record points to their public IP address.
Spammers are sending mail to the ip address of the WEBSITE (my server) and cPanel appears to be obliged to relay these messages to that offsite mail server.
How do I stop these thousand or so messages a day from being relayed without interferring with mail generated by one of their online forms from being sent to that outside mail server?
 

mtindor

Well-Known Member
Sep 14, 2004
1,452
110
193
inside a catfish
cPanel Access Level
Root Administrator
Scenario...
companyabc.com has a website hosted on our cPanel server. They have their own email server so the MX record points to their public IP address.
Spammers are sending mail to the ip address of the WEBSITE (my server) and cPanel appears to be obliged to relay these messages to that offsite mail server.
How do I stop these thousand or so messages a day from being relayed without interferring with mail generated by one of their online forms from being sent to that outside mail server?
See if companyabc.com exists in /etc/secondarymx

If you have a domain on your Cpanel server for which you are handling the website but are NOT handling the email, then:

1. You should see companyabc.com in /etc/remotedomains
2. You should not see companyabc.com in /etc/localdomains or /etc/secondarymx

And if you query a public DNS server (using Dig for instance), you should not see your Cpanel server listed as one of the MX's.

dig companyabc.com mx @resolver.qwest.net

None of the MXs listed should be your cpanel server, unless you specificaclly wanted your Cpanel server to act as a secondary MX. And if you did want your Cpanel server to be a secondary MX for the domain, then it's going to forward any email that hits it to the main mail server.

Mike