Fight against spam part 1 – Postfix SPF

Sender Policy Framework (SPF) –  is a simple email-validation system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain comes from a host authorized by that domain’s administrators. The list of authorized sending hosts for a domain is published in the Domain Name System (DNS) records for that domain in the form of a specially formatted TXT record.  – Wikipedia


I assume you have working postfix server already. Also I assume that you follow guide that have been posted here Postfix i Dovecot – perfect duo for mail server which use Debian/Ubuntu to achieve that.


Install needed package:

Default configuration that is present in package give us almost complete implementation we need to tweak it a bit to make it perfect:

Let postfix know that we use more anti-spam technics:

We need to restart postfix to make thise work



Rest post related to this topic:

Postfix i Dovecot – perfect duo for mail server

Fight against spam part 2 – Postfix DKIM

Fight against spam part 3 – Postfix DMARC

Fight against spam part 4 – Postfix SpamAssassin

Fight against spam part 5 – Dovecot Sieve



Leave a Reply

Your email address will not be published. Required fields are marked *