Help - Search - Members - Calendar
Full Version: A remote host can't be localhost or localdomain
The Planet Forums > Control Panels > cPanel/WHM
aussie
Its amazing how much spam is being sent from remote hosts claiming to be localhost or localdomain. There is also another one called (friend). But here is a HELO/EHLO check you can add to your exim rules to drop the pesky spammers who claim they are sending message from localhost. If you don't have a HELO/EHLO greeting section in your exim rules then thats another problem. You really should. It will cut out huge amounts of spam.

######################################################################
# HELO/EHLO greeting section
######################################################################

# A remote host can't be localhost or localdomain
deny hosts = !+relay_hosts
message = $sender_helo_name is a silly HELO
condition = ${if match
{$sender_helo_name}
{N^(127.0.0.1|localhost(.localdomain)?)$N}
{yes}{no}}

Here is an example of the message dropped by the above rule. The sending host claims its a remote host. rolleyes.gif

2006-03-27 03:38:35 H=(localhost) [86.106.55.32] F= rejected RCPT : localhost is a silly HELO
2006-03-27 03:38:36 unexpected disconnection while reading SMTP command from (localhost) [86.106.55.32]
whoisjb
Thanks for the tip. However, I'm new to cPanel and Exim (used Plesk and qmail for years) and I'm not sure where to place this code using the WHM configuration editor tool.

Also, I have a mailing list PHP script that allows you to specify SMTP for outgoing messages. However, whenever I do this, it doesn't work. It appears that Exim or something in my configuration won't allow PHP to use SMTP on localhost (or something to that effect). I have scoured the boards and haven't really found a solution. I was hoping you may have some advice.

I've tried uncommenting the line that reads:

# host_accept_relay = localhost

But, I get an error when trying to restart Exim. This is very annoying and I know next to nothing about Exim. I know it's better than qmail, but that's about it. I appreciate anyone's input on this!

Also, I have made some recommended changes to the default Exim configuration to help reduce spam (RBLs, etc.) which I got off this board:

How to: RBL or DNSBL with Exim

Not sure how much that is affecting the problem if at all. I can post any configuration settings you may want to see.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.