SPF Question

ViAdCk

Verified User
Joined
Feb 14, 2005
Messages
247
Hi guys!

We have some doubts regarding spf. Emails sent from our whmcs billing system are often going into spamboxes at hotmail, yahoo etc. Our configuration is like this right now:

1) domain.com is pointing to a server with ip 1.2.3.4
2) subdomain.domain.com is pointing to a different server with ip 1.2.3.5, whmcs is installed on this subdomain
3) often when we send an email through whmcs it goes to the spamboxes.
4) when we check the mail headers at hotmail for example we see the following: spf=none

We think this could be the reason why these emails are considered spam. Do we have to create a specific spf record for this subdomain in the main domain dns file? If yes, what would the exact configuration be?

Thanks in advance!
 
Your spf record should include all the possible IP addresses your domain might use to send email. So for example your spf may want to look like:
"v=spf1 a mx ip4:1.2.3.4 ip4:1.2.3.5 ~all"
which means any email for your domain should be valid if they come from 1.2.3.4 and 1.2.3.5
 
Hello,

You need to have a valid SPF record for a domain which is used in emails. If you use [email protected], then you need a SPF record for domain.com, if support@subdomain.domain.com (or similar), then create a SPF record for subdomain.domain.com the way suggested by the user toml.
 
Thanks for your answers!

So we have updated the spf file as follows: domain.com. 14400 IN TXT "v=spf1 a mx ip4:1.2.3.4 ip4:1.2.3.5 ~all"

Would this be enough? Or do we also have to create an extra spf entry with something like this:

subdomain.domain.com. 14400 IN TX "v=spf1 a mx ip4:1.2.3.5 ~all"

Thanks again!
 
It is hard to say, it really depends on how you send the email. As Alex mentioned, if you send the email as:
[email protected] then yes, you need to add the spf record to the subdomain as well, if the email still goes out as:
[email protected] then just adding the multiple IP addresses to the spf record should be enough.
 
Yes, the emails from whmcs are being sent as [email protected]

The spf is obviously created automatically in the dns file the subdomain has on the second server but this isn't having any effect.

So in the dns file of the main domain I have to add the following right? subdomain.domain.com. 14400 IN TX "v=spf1 a mx ip4:1.2.3.5 ~all"

Thanks again!
 
What domain do you have in address in FROM: header of an email from WHMCS? That's the only thing that is important for SPF here.
 
@Muni3k,

Nobody here and neither Google/Gmail say that SPF is sufficient for them to allow all your emails to finish its way in an INBOX folder. You already stated that your IP has a poor reputation. And it might take a while before your IP reputation will be corrected.
 
What domain do you have in address in FROM: header of an email from WHMCS? That's the only thing that is important for SPF here.

These are the email headers from the whmcs email:

Code:
Received: from server.hostname.com (server.hostname.com. [1.2.3.5])
        by mx.google.com with ESMTPS id n74si20828054wmg.4.2015.11.15.11.02.15
        for <******@gmail.com>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 15 Nov 2015 11:02:16 -0800 (PST)
Received-SPF: neutral (google.com: 1.2.3.5 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=1.2.3.5;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 1.2.3.5 is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Received: from username by server.hostname.com with local (Exim 4.86)
	(envelope-from <[email protected]>)
	id 1Zy2XT-002FDS-7I
	for ******@gmail.com; Sun, 15 Nov 2015 20:00:35 +0100

Thanks :)
 
There is no TXT record for the domain with SPF:


Code:
[root@gold rotated]# dig TXT sub.domain.com


; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6_7.4 <<>> TXT sub.domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36871
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0


;; QUESTION SECTION:
;sub.domain.com.         IN      TXT


;; AUTHORITY SECTION:
domain.com.           3546    IN      SOA     ns1.domain.com. root.domain.com. 2015110200 14400 3600 1209600 86400


;; Query time: 45 msec
;; SERVER: 2a01:7c8:b::c53#53(2a01:7c8:b::c53)
;; WHEN: Mon Nov 16 18:18:11 2015
;; MSG SIZE  rcvd: 84


[root@gold rotated]#
 
Back
Top