-3

I'm running a VPS on OVH (vps403xxx.ovh.net) from which I send emails. Problem is Spamassassin tells me I should publish a DNS (MX) entry for vps403xxx.ovh.net or my messages go to spam.

I know how to publish a MX record on OVH for usual domains, but it seems there is no way to do it from the OVH interface for VPS.

Any idea how to proceed ?

Thanks

maximilien
  • 11
  • 3
  • 1
    MX records designate which server RECEIVES email for a domain, not which server SENDS email for a domain. What you need to do is to set up an SPF record, which designate which server SENDS email for a domain. – joeqwerty Dec 05 '18 at 13:54
  • Many thanks @joeqwerty. I have no clue how to add a SPF to a VPS. I've looked though... I did enter a SPF record for my domain (example.org), which points to vpsxxx.ovh.net, but I still have this message "vpsxxx does not authorize your server 92.222.xxx.xx to use nobody@vpsxxx.ovh.net" Like my mails are sent from vpsxxx.ovh.net – maximilien Dec 05 '18 at 16:34

3 Answers3

4

You are not sending mails for @vpsxxx.ovh.net but for another domain, e.g. example.org. You need to set an MX entry in that domain pointing to vps403xxx.ovh.net. If you send mails for multiple domains, you should do this for all domains ( Setting an MX entry in ovh.net will not be possible anyway).

This is primarily important to be able to receive mails - for spam classification, other methods like SPF records (also pointing to that machine...) are more important.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • Thank you ! Actually I do have a domain, let's say example.org. I did add a SPF and a MX record pointing from example.org to vpsxxx.ovh.net but mail-tester.org still tells me : "We did not find any mail server (MX record) behind your domain name vpsxxx.ovh.net. You should publish a DNS entry (MX) on your domain name vpsxxx.ovh.net". That's why I ask. So besides the MX and SPF records I did enter in OVH's interface for example.org, any idea what to do ? – maximilien Dec 05 '18 at 16:28
  • 1
    Edit your question to include your actual non obfuscated domain. It is not clear specifically what is happening, or if your tools are confusing the host name for the email domain. – John Mahowald Dec 06 '18 at 04:43
2

An MX record links your domain name to your email service provider’s servers (your VPS).

You will need a domain name before you can proceed with this. You can then use your domain registrar's DNS servers, or have the registrar point the NS records to OVH's DNS servers and manage it from there.

Bert
  • 2,733
  • 11
  • 12
1

Found it !  In the VPS postfix conf. file, had to change the domain name. It was still vpsxxx.ovh.net but it had to be example.com

Thanks.

maximilien
  • 11
  • 3
  • 1
    Please read [How to ask better questions on Serverfault](http://meta.serverfault.com/questions/3608) to ask a better question next time. Your question is unrelated to that answer. – Sven Dec 10 '18 at 09:59