0

hope everyone will be doing fine. I am having a problem with sending emails to other domains. I have setup SMTP server on one of the dedicated servers and all the applications on each dedicated server are using this only SMTP. Now emails are not being received on gmail. I have read somewhere that there must be SPF record added to SMTP. I am just a software engineer and never worked on maintaining the servers or networking, so do not know what to do to add this record. On many forums, I have read that you must add this using CPanel, I want to know whether can I add this by logging to the dedicated server or I really need CPanel to connect? (Actually I have also forgot the CPanel details, although have requested to hosting provider to retrieve) Please help me, one might have to give me a detailed info as well as assistance. Regards

azhar rahi
  • 331
  • 4
  • 16

2 Answers2

1

An SPF record must be setup in the DNS zone where the domain is hosted. Is that on your actual server or are you using external DNS hosting?

In case it's on your own server and you use 'bind', edit the DNS file located at /var/named/domain.com (where domain.com is your actual domain name) and set it up as followed:

domain.com. 14400 IN TXT "v=spf1 a mx ip4:192.168.5.10 ~all"

** Comment: 192.168.5.10 is the IP of your mailserver

After this is done, restart the DNS server with /etc/init.d/named restart


To check if your SPF record is setup correctly, check it out via MXTOOLBOX:

http://mxtoolbox.com/spf.aspx

You fill in the domain name there for the domain where the SPF record has just been installed. If it's setup correctly, it will show.

One other small advice I have is to also work with DKIM (especially needed for good delivery to Hotmail).

0

Yes, If you are using cpanel on your server then you need to enable SPF through cpanel. OR you can use following command to enable SPF for your domain.

/usr/local/cpanel/bin/spf_installer cpusername
24x7servermanagement
  • 2,520
  • 1
  • 13
  • 11