Configure a SPF rule on Ubuntu

1

Where I can create/insert the SPF rules to allow a external server to authenticate and send e-mails using the domain name of my server running Ubuntu?

I need to insert this rule:

v=spf1 ip4:111.111.111.111/29  ip4:111.111.111.111/24 a mx ~all

Thanks :)

Thiago Belem

Posted 2010-03-26T16:31:46.547

Reputation: 529

1serverfault would have been a better location for this question. – Zoredache – 2010-03-26T20:23:59.280

Answers

1

SPF is a method of identifying the server(s) approved for sending email for a domain. You publish it as a TXT record in the DNS of the domain in question (and note that there's a mailing list for help, which the record you supply needs ;>).

As Teddy said, SPF isn't perfect and it has problems if you implement it without knowing what you're doing. That doesn't (in my book) make it stupid, it just means that it's easy to shoot yourself in the foot if you rush at it. Personally I've been using, and checking, SPF for a couple of years now with no problems.

It also only addresses half the problem, you'll probably want to look at DKIM (not Domain-Keys) too.

Cry Havok

Posted 2010-03-26T16:31:46.547

Reputation: 3 486

Sorry, but SPF is stupid. This is because it doesn't solve anything, but only pretends to do so, at the cost of breaking a lot of useful things. See the links in my answer for details. – Teddy – 2010-03-31T10:55:52.527

1

It is my understanding that SPF is inserted into a TXT (or SPF) record in the DNS zone, and not in a setting in the mail server.

(Note: SPF is stupid and I seriously discourage its use.)

Teddy

Posted 2010-03-26T16:31:46.547

Reputation: 5 504

1

It can't be anymore stupid than inserting a link to a page full of ads with no technical content (http://homepages.tesco.net/~J.deBoynePollard/FGA/smtp-spf-is-harmful.html).

– jww – 2013-10-12T01:27:32.447

@noloader Link moved; fixed. – Teddy – 2013-10-26T12:26:45.223