Project:Infrastructure/Developer E-Mail

This document describes what you, as a Gentoo Developer, can expect from our e-mail system, and provides configuration details you require.

Introduction
This document describes the various options for checking your gentoo.org email address. You can opt for having the e-mails forwarded to a specific e-mail address, or let them stay on the dev.gentoo.org server to which you can connect using your favorite e-mail client with POP3S or IMAPS (the secure implementations of POP3 and IMAP respectively).

Logging on to dev.gentoo.org is performed using the ssh keys you have generated and submitted to your mentor with your quiz (or that you have updated in LDAP if your previous key reached expiration).

For convenience, export your username to a USERNAME variable. This will enable you to copy and paste the relevant commands that follow. The example below uses a value of  as an example, be sure to substitute   with your proper username:

Forwarding e-mails
If you want to have your e-mails forwarded to another e-mail address, you should log on to dev.gentoo.org and put the e-mail address in a file. Simply:

If a connection cannot be made be sure to verify the ssh key being used to login to dev.gentoo.org is the same key submitted with your quiz.

Once connected:

If you at some point want to change the e-mail address to which the e-mails should be forwarded, change the content of the file to the new e-mail address.

Using the mailbox on dev.gentoo.org
If you want to use the mailbox on dev.gentoo.org, you must make sure that there is no in your home directory. Doing this requires access to dev.gentoo.org (duh). As noted in the Introduction section above, accessing dev.gentoo.org requires an ssh key. Be sure the correct ssh key is being used when connecting.

Remove the file (if it exists):

There are some things you must know about your mailbox on dev.gentoo.org:


 * You can only access it using POP3S or IMAPS (see the following chapter).
 * There are some local e-mail clients installed on dev.gentoo.org ( and to be exact). Only use those if you know how to use them :)
 * The password to access the mailbox is the same password you can set on dev.gentoo.org using the command.

Accessing dev.gentoo.org using POP3 and STARTTLS or POP3S
POP3 is a pull-protocol, meaning that e-mails are pulled from the server to your local disk.

To set up your favorite e-mail client for POP3 and STARTTLS or POP3S, use the following settings:


 * POP3 server : dev.gentoo.org
 * Use SSL : yes
 * Account : your username
 * Password : your dev.gentoo.org password

For instance, if you are using to fetch your e-mails, your  should read something like this:

If you are using for your e-mails, create a new account and make sure that the Receive tab uses POP3 and the SSL tab has the Use SSL for POP3 connection selected.

If you are using, you're smart enough to figure this one out yourself.

Accessing dev.gentoo.org using IMAP and STARTTLS or IMAPS
IMAP is a push-protocol, meaning that e-mails stay on the remote server and you can manage separate mailboxes on that server.

To set up your favorite e-mail client for IMAP and STARTTLS or IMAPS, use the following settings:


 * IMAP server : dev.gentoo.org
 * Use SSL : yes
 * Account : your username
 * Password : your dev.gentoo.org password

For instance, if you are using  to fetch your e-mails, your  should read something like this:

If you are using, you're smart enough to figure this one out yourself.

Using dev.gentoo.org as a mail relay server
If you would like to reduce the SRF spam scoring against your email, or do not wish to use your ISP's relay, you may relay your email through dev.gentoo.org.

Now setup your e-mail client to use dev.gentoo.org as the SMTP server. Select yes when asked if the server uses authentication. Also enable STARTTLS. If you get the choice, select plain as the hash-method. Use your username and your LDAP password for authentication. The certificate is also signed by DigiCert as of 2014/04/12.

Setting up procmail rules for Spam Checking
All email coming into dev.gentoo.org is scanned for spam and viruses. Viruses are automatically deleted so there is no need to check for them yourself. To check for spam use something like the following procmail recipe.

If you wish to check your spam based on spam level a recipe like the following can be used (adjust the number of '\*' to the level that fits you best, the more stars the greater the possibility that what you are filtering is spam).

Setting up procmail for Reply-To handling
This section is written on request of many Gentoo developers to cover how to modify the Reply-To header in an email for consistency across all of the Gentoo mailing lists. For reasons not mentioned here, there is an inconsistency between the  private mailing list, and the rest of the Gentoo mailing lists.

Removing Reply-To
Users who have a MUA that supports a Reply-To-List function will likely want to remove the munged Reply-To headers. This allows them to use their mail client how it was intended, with the Reply button replying to the Author. If your mail client has a Reply-To-List function, you can use the following recipe snippet in your file to remove the Reply-To headers.

This scans the message headers for any Gentoo list and removes any Reply-To header that it finds.

Adding Reply-To
Some of the most popular mail clients in use do not support a Reply-To-List function. This causes problems for the users of these clients and has resulted in Reply-To munging being used to reduce complexity for these users. Since only the  mailing list does not use Reply-To munging, the following rule only touches that list.

This scans for the  list and adds a Reply-To header pointing to the list.

Sender Policy Framework
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  and your body   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 as follows:

Mutt
You can set your envelope from address in as follows:

Qmail
You can forward all your email through mail.gentoo.org using the file:

MSMTP
You can do per-account forwarding using. Configure as follows:

Next, configure your mail user agent to use for sending email. A sample configuration follows:

Other user agents
For Thunderbird, Evolution and other MUAs (mail user agents), you can use  or another mail transfer agent (MTA) as described above to forward your mail through mail.gentoo.org.

Designating other servers as permitted senders
If you DO still need to send mail via another server, it is strongly recommended that you populate your per-developer SPF record in LDAP. This is contained in the LDAP field.

The LDAP field MUST contain a valid SPF policy, with additional allowance that the v=spf1 prefix is optional in LDAP (it will be included in the DNS records exactly once regardless).

If the LDAP field is not set for a user, the SPF policy default of  will be applied.

To permit mail from GMail, Gentoo, and nowhere else
This allows you to send @gentoo.org mail from Gentoo servers (per the top-level gentoo.org SPF rule), Google servers, and nowhere else

To permit mail from only Gentoo and nowhere else
This allows you to send @gentoo.org mail from Gentoo servers only (e.g. if you ALWAYS relay to woodpecker).

Apply some other SPF record
If you wish to deploy some other SPF policy, here is the commandline to do so.

What happens when dev.gentoo.org goes down?
When dev.gentoo.org goes down, e-mails will stay in the mailqueue on mail.gentoo.org and will be delivered whenever dev.gentoo.org is up again.

Can I use procmail on dev.gentoo.org?
Yes you can. You need to create a file thought with the following content:

Can I use sieve/managesieve on dev.gentoo.org?
You need to create a file thought with the following content:

Then create a Sieve script like seen in this example.

Can I use SpamAssassin on dev.gentoo.org?
Spam is automatically marked for you. There is no need to run your mail through any additional filters just check for the appropriate headers.

Why don't you set up a system-wide (spam|virus) filter?
Due to the rapid spread of e-mail borne viruses we have had to filter all of these despite the risk of losing legitimate e-mail. Spam filtering is not 100% accurate so although we tag all e-mail with Spam level headers we do not filter it. We leave that option to the developers to do so if they choose.

How can I exempt myself from Sender Address Verification?
By default all @gentoo.org users get Sender Address Verification enabled for them for free. We recognize that there are times when this is less than ideal and put a system in place for you to exempt yourself from it. You can simply and wait about an hour for the recipient_filtering to be rechecked. Note however that when you opt for permissive mode that no spam or virus filtering is done for your account.

Are my e-mails or the contents of my home directory backed up regularly?
No, it's the responsibility of the individual to back up their own important files and mail.

How can I copy over files from/to dev.gentoo.org?
Use, the Secure Copy Program.

Acknowledgements
We would like to thank CACert and DigiCert for their continued support of open source projects by providing SSL certificates.