Setting up SPF on shared hosting
February 3, 2006 8:09 AM
Subscribe
An AskMefi question today about joe-job spam has me interested in setting up a preventative SPF record for my business server, which is a hosted domain at Dreamhost. However I do all my mail through my home DSL, connecting via SMTP to my domain at Dreamhost. Is an SPF record a viable solution? Can I put in a range of my ISP's addresses to whitelist them in SPF?
I looked at OpenSPF's wizard and am overwhelmed by all the mx, ptr, a:, ip4:, etc questions it asks; it looks too dangerous to mess around with. I tried the Dreamhost support boards but questions about SPF there are unanswered; their Wiki is nonspecific. I also wonder how long it takes for a change to propagate, in case my server moves.
posted by hodyoaten to computers & internet (4 comments total)
If I were you, I wouldn't worry about IP#s at all. Most of what you need to do with SPF can be done using hostnames and domain names.
This is my SPF record:
"v=spf1 a mx ptr a:relay.pair.com a:uinus.pair.com a:mail.oz.net include:oz.net include:pair.com, ?all"
Broken down:
"a:relay.pair.com a:uinus.pair.com a:mail.oz.net"
My web and e-mail host is pair.com. Their primary server for outgoing mail is relay.pair.com, but there was a possibility that mail could go out from the machine hosting my website (uinus).
My ISP is oz.net. When I send mail from home, my mail client is set to use mail.oz.net as its SMTP server.
Next up "include:oz.net include:pair.com"
This is a catchall because I was too lazy to track down the other servers that might be used if, for example, I used webmail at oz or pair.
Finally: "?all" means that this SPF record doesn't neceesarily represent all the machines that can convey mail for geekfun.com. Interpretation is left up to the receiving e-mail server. My intent here is to signal that while mail matching this SPF record is likely to be legit, mail that doesn't match isn't necessarily bogus.
This isn't the tightest SPF record, there are various ways that it can be abused, but to the extend receivers are paying attention to SPF records, it reduces the opportunity for random abuse of geekfun.com as a forged sender address.
Why don't you take your best stab at an SPF record with the OpenSPF wizard and post it here if you want a second opinion on what it will do. It isn't going to have any effect until you manually add it to your DNS anyway.
posted by Good Brain at 8:44 AM on February 3, 2006