Quantcast
Channel: Idowebdesign
Viewing all articles
Browse latest Browse all 10

Using postfix with SPF to avoid being flagged as spam

$
0
0

On thing important when you have you own linux box to host a web server is the ability to send email as many services are relying on this.

Often mail server receiving these email will flag them as spam because of improper configuration. Here is how I have been able to overcome this issue:

  1. Make sure you have a domain or subdomain pointing to you server IP that you can use as a tool domain. In this example I will user server.idowebdesign.ca
  2. So I have a A record with server.idowebdesign.ca pointing to the server IP
  3. Now edit the file configuration /etc/postfix/main.cf
  4. Make sure the hostname file looks like this: myhostname =  server.idowebdesign.ca
  5. Also make sure this line is like this: inet_protocols = ipv4 (this will ensure the postfix is only using ipv4 and ipv6 to send out the emails).
  6. Restart Postfix: /etc/init.d/postfix restart
  7. Now create a SPF record in you DNS to allow sending email from this IP. Create a TXT record and the content should be: v=spf1 ip4:xxx.xxx.xxx.xxx -all where xxx.xxx.xxx.xxx is your server IP address. The txt should be on server.idowebdesign.ca (the domain you have used in step 1).

Now you should be all set. You can test it by having the server send an email, on my side I use WordPress recover password to test it against google server. The mail should not go to spam anymore. Check the original version of the mail (in gmail, dropdown next to reply button > show original). This will help you to troubleshoot if the email still goes to spam.


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images