SPF Howto
1.
SPF and Gentoo
Introduction
Gentoo uses the Sender Policy Framework, or SPF, to filter forged @gentoo.org
email, so it's important to configure your mail client or server correctly so it
doesn't get filtered. The most important thing is that MAIL FROM: and
your body From: needs to match and that you can't forge return-path. If
you obey these rules you shouldn't have problems with SPF filtering your
emails.
Below are some configurations for a few common clients and mailers.
SSMTP
To forward all mail through mail.gentoo.org configure
/etc/ssmtp/ssmtp.conf as follows:
Code Listing 1.1: Editing ssmtp.conf |
mailhub=mail.gentoo.org:25
AuthUser=username
AuthPass=password
AuthMethod=CRAM-MD5
UseTLS=YES
useSTARTTLS=YES
|
Mutt
You can set your envelope from address in ~/muttrc as follows:
Code Listing 1.2: Editing muttrc |
envelope_from_address who@example.com
use_envelope_from true
|
Qmail
You can forward all your email through mail.gentoo.org using the
/var/qmail/control/smtproutes file:
Code Listing 1.3: Editing smtproutes |
:mail.gentoo.org USERNAME PASSWORD
|
MSMTP
You can do per-account forwarding using msmtp. Configure
~/.msmtp as follows:
Code Listing 1.4: Editing .msmtp |
account default
host mail.yourisp.com
user johnsmith
password spork
tls
|
Next, configure your mail user agent to use msmtp for sending email. A
sample mutt configuration follows:
Code Listing 1.5: Using msmtp with mutt |
send2-hook . 'set sendmail="/path/to/msmtp"'
send2-hook '~f gmx' 'set sendmail="/path/to/msmtp -a gmx"'
macro index ,g '<enter-command>set sendmail="/path/to/msmtp -a gmx"<enter>' 'choose gmx smtp profile'
|
Other user agents
For Thunderbird, Evolution and other MUAs (mail user agents), you can use
ssmtp or another mail transfer agent (MTA) as described above to forward
your mail through mail.gentoo.org.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.
|