OVH Community, your new community space.

helo/hostname mismatch

06-09-2010, 16:40
I think I have found the reason.
It was my fault from the start.

In the new dedicated server I had old firewall config rules with masquarade enabled.
This way everything going out of the server had the source ip changed into the main server's IP. That's why the destination server saw the external IP address as the source address instead of the VM's IP and could not recognize the hostname to the address and thought that the mail was spam. Disabling the NAT and changing the rules helped...for now.

I hope that the rest of the VMs will not cry about the firewall rules changing

Stupid thing took me two weeks to figure out. Anyway, thanks for your help guys!

Have a nice day.

If you're reading this mail from some kind of an archive and it's year 2013 already then you have greetings from the past, and I am glad that you have survived the 2012

03-09-2010, 04:39
Yea the whole spam blocking stuff is almost as stupid as vi vs emacs arguments. I'd advocate it is their end as well, but for the sanity of it, changing a single hostname line is much easier

01-09-2010, 22:09
In "/etc/postfix/" make sure that the "myhostname" variable resolves to the IP you're using. So if you use "myhostname =", then an nslookup for "" should give the external IP for the VM.

But in the above case, the remote server might be a bit over-zealous with blocking e-mails (shouldn't need to be), in which case your hostname ("hostname -f" from the shell) should match the IP/HELO ("myhostname=") from postfix. Personally I consider that to be an issue on the remote end though, not yours.

01-09-2010, 20:51
Thanks for the answer. Your idea seems fine, but the strange thing is that I did not need to have this set like that on the previous dedicated server, from which I moved the VM from.
The other thing is that if I would follow this idea, I would have to change a hostname to the same one on every VM running on the dedicated server so the postfix would always be return proper answers.
I think it should not be like this. Anyway, I will check into your idea Thanks!!
If any one has more thoughts then please don't hesitate.

01-09-2010, 13:31
The reverse DNS must match the IP/hostname of the server. I'm not sure why it thinks the main server is doing it, might be some OVH trickery or something.

Either way, you need to change the VM hostname to be the same as the physical server hostname (or at least what the mail thinks it is). Not sure how to do that, but that is the problem

01-09-2010, 09:28
I have a problem with sending e-mail through my smtp.
When sending from my virtual machine server I get a response:

Recipient address rejected: Mail appeared to be SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and DNS MX settings or to get removed from DNSBLs; MTA helo: {VM-HOSTNAME}, MTA hostname: {MAIN_SERVER_HOSTNAME}[{MAIN_SERVER_IP}] (helo/hostname mismatch) (in reply to RCPT TO command))

I am running a dedicated server with several virtual machines

I have bought a dedicated server "A" on which a virtual machine "VM" was running. On the main server "A" an IPTABLES rule was applied so the "VM" was running on its own IP address (selected from an IP-Failover list).

Later on I have moved the "VM" from the dedicated server "A" to dedicated server "B". In the OVH manager I have moved the routing of the "VM"-IP to the new server "B" and in the server "B" the IPTABLES rule sets routing to the "VM"
Since that moment when sending e-mail my postfix on the "VM" gives errors when sending e-mail to certain receipients.
It looks like the destination smtp server cannot see the proper IP of the "VM" but it sees the IP of the dedicated server "B" and thinks that this is the server that the smtp should run on.
According to policyd:

How can I solve this problem?