Basics

SPF

Sender Policy Framework

Principle: declare a DNS TXT (former SPF) record the hosts that are allowed to send mail from the current domain.

DKIM

DomainKeys Identified Mail

Principle: ask your MTA to pass mails through a dkim service before sending them (like OpenDKIM). The DKIM signing service signs emails with a given k

Great article to configure OpenDKIM: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy

DMARC

This is a policy/rule that tells the receiver MTA what to do in case of problems with the SPF records and/or DKIM signatures.

Postfix

Hostname and domain name

Properly set up /etc/hostname with the short name of the server.

/etc/hosts should contain 127.0.1.1 shortname.domain.name shortname too. (the fqdn must be first !)

hostname --fqdn should return the full fqdn.

Errors

Sending a mail: Helo command rejected: need fully-qualified hostname (in reply to RCPT TO command))

Solution: myhostname should have a fqdn instead of a short hostname in /etc/postfix/main.cf

Administration

Print queues content: postqueue -p

Delete a mail from a queue: postsuper -d EMAILID