can't remove ips from relayhosts file

sparktino

Member
May 10, 2009
23
0
51
Hello all,

My cpanel server's relayhosts (/etc/relayhosts) file contains few additional ips that I have not added through alwaysrelay (/etc/alwaysrelay). I am trying to remove these ips but the ips coming back to the relayhosts file few minutes after I delete it. Anybody please help me to find out what is happening here.
 

Brian

Well-Known Member
Dec 1, 2010
117
3
68
Texas
cPanel Access Level
Root Administrator
/etc/relayhosts is automatically populated when users take advantage of the service that Tailwatchd's Antirelayd offers. This service is enabled by default on cPanel boxes.

(WHM -> Service Manager -> Antilrelayd (under Tailwatchd))

If you don't know what Antirelayd, it's a service that permits "POP Before SMTP" behavior.

POP before SMTP - Wikipedia, the free encyclopedia

In short, if someone checks their email account with a valid POP/IMAP user, then their IP is added to /etc/relayhosts for 30 minutes since they're considered an authorized user.

Read on how to disable Antirelayd and require SMTP Authentication in all circumstances here: Require SMTP Authentication

If you see IPs popping up into /etc/relayhosts then that's a pretty good indication that you have several users taking advantage of POP Before SMTP (Antirelayd). If you turn it off, expect to see support tickets from those users claiming they can no longer send mail. Be prepared to instruct them on how to enable SMTP Authentication within their browsers to then correct the issue.