Even though this system makes it easy to set up an email server, running your own email system is still not easy and this is mainly due to the huge amount of collatoral damage caused by spammers over a long period of time, which in turn is due to the inherent insecurity of email protocols which enabled spam to become a big problem. Email is still very popular though and most internet services require that you have an email address in order to register.
</p>
<p>
In using an email address hosted on your own system you will quite likely find that it is blocked and bounced by other popular email systems. Such blocking is almost never based upon any evidence that your system is actually producing spam and usually it's just because your IP address happens to be within a certain range. Rather arrogantly many of the anti-spam rule sets assume that if an email is sent from an IP address range which is "residential" (i.e. not a company or other organisation) then <i>it must therefore be spam</i>.
</p>
<p>
So if you want to use your own email address hosted on your own system you do need to be prepared to encounter some difficulties and annoyances. Sadly, often these annoyances will be unsolvable and are not a matter of using different software or configuring things differently.
<h2id="orgheadline2">A technical note about email transport security</h2>
<divclass="outline-text-2"id="text-orgheadline2">
<p>
Port 465 is used for SMTP and this is supposedly deprecated for secure email. However, using TLS from the start of the communications seems far more secure than starting off with insecure communications and then trying to upgrade it with a command to begin TLS, as happens with STARTTLS. There are <ahref="https://www.eff.org/deeplinks/2014/11/starttls-downgrade-attacks">possible attacks against STARTTLS</a> in which the command to begin secure communications is removed or overwritten which could then result in email being transferred in plain text over the internet and be readable by third parties.
</p>
<p>
From <ahref="http://motherboard.vice.com/read/email-encryption-is-broken">http://motherboard.vice.com/read/email-encryption-is-broken</a>:
</p>
<blockquote>
<p>
The researchers also uncovered mass scale attacks of STARTTLS sessions being stripped of their encryption. That attack itself isn't new: internet service providers sometimes do it to monitor users; organizations may use it to keep an eye on employees; or it may come from a malicious actor
<h2id="orgheadline3">Add a password to your GPG key</h2>
<divclass="outline-text-2"id="text-orgheadline3">
<p>
If you didn't use existing GPG keys during the Freedombone installation then you'll need to add a password to your newly generated private key. This is highly recommended. Go through the following sequence of commands to ssh into the Freedombone and then change your GPG password.
Having a password on your GPG key will prevent someone from reading your email <i>even if your server gets lost or stolen</i> or if someone else has physical access to it. Make the password something long and unlikely to be guessable or vulnerable to a brute force <ahref="http://en.wikipedia.org/wiki/Dictionary_attack">dictionary attack</a>.
If you're using Windows there is an ssh client called putty, on Linux just open a terminal and enter the above command with your username and domain name. On Android you can use the ConnectBot app with the hostname <b>username@domain:2222</b>
</p>
<p>
Once you have logged in via ssh then just type <b>mutt</b>. Like most terminal programs mutt is quite easy once you've learned the main keys.
<tdclass="org-left">Search for text within headers</td>
</tr>
<tr>
<tdclass="org-left">*</td>
<tdclass="org-left">Move to the last message</td>
</tr>
<tr>
<tdclass="org-left">TAB</td>
<tdclass="org-left">Move to the next unread message</td>
</tr>
<tr>
<tdclass="org-left">d</td>
<tdclass="org-left">Delete a message</td>
</tr>
<tr>
<tdclass="org-left">u</td>
<tdclass="org-left">Undelete a mail which is pending deletion</td>
</tr>
<tr>
<tdclass="org-left">$</td>
<tdclass="org-left">Delete all messages selected and check for new messages</td>
</tr>
<tr>
<tdclass="org-left">a</td>
<tdclass="org-left">Add to the address book</td>
</tr>
<tr>
<tdclass="org-left">m</td>
<tdclass="org-left">Send a new mail</td>
</tr>
<tr>
<tdclass="org-left">ESC-m</td>
<tdclass="org-left">Mark all messages as having been read</td>
</tr>
<tr>
<tdclass="org-left">S</td>
<tdclass="org-left">Mark a message as spam</td>
</tr>
<tr>
<tdclass="org-left">H</td>
<tdclass="org-left">Mark a message as ham</td>
</tr>
<tr>
<tdclass="org-left">CTRL-b</td>
<tdclass="org-left">Toggle side bar on/off</td>
</tr>
<tr>
<tdclass="org-left">CTRL-n</td>
<tdclass="org-left">Next mailbox (on side bar)</td>
</tr>
<tr>
<tdclass="org-left">CTRL-p</td>
<tdclass="org-left">Previous mailbox (on side bar)</td>
</tr>
<tr>
<tdclass="org-left">CTRL-o</td>
<tdclass="org-left">Open mailbox (on side bar)</td>
</tr>
<tr>
<tdclass="org-left">r</td>
<tdclass="org-left">Reply to an email</td>
</tr>
<tr>
<tdclass="org-left">L</td>
<tdclass="org-left">Reply to a mailing list email</td>
</tr>
<tr>
<tdclass="org-left">]</td>
<tdclass="org-left">Expand or collapse all threads</td>
</tr>
<tr>
<tdclass="org-left">[</td>
<tdclass="org-left">Expand of collapse the current thread</td>
</tr>
<tr>
<tdclass="org-left">CTRL-k</td>
<tdclass="org-left">Import a PGP/GPG public key</td>
</tr>
<tr>
<tdclass="org-left">q</td>
<tdclass="org-left">Quit</td>
</tr>
</tbody>
</table>
<p>
To use the address book system open an email by pressing the enter key on it and then to add the sender to the address list press the A key. It will ask you for an alias which may be used the next time you want to send a mail. Alternatively you may just edit the <b>~/.mutt-alias</b> file directly to add email addresses.
</p>
<p>
One of the most common things which you might wish to do is to send an email. To do this first press <i>m</i> to create a new message. Enter the address to send to and the subject, then after a few seconds the Emacs editor will appear with a blank document. Type your email then press <i>CTRL-x CTRL-s</i> to save it and <i>CTRL-x CTRL-c</i> to exit. You will then see a summary of the email to be sent out. Press <i>y</i> to send it and then enter your GPG key passphrase (the one you gave when creating a PGP/GPG key). The purpose of that is to add a signature which is a strong proof that the email was written by you and not by someone else.
</p>
<p>
When reading emails you will initially need to enter your GPG password. It will be retained in RAM for a while afterwards.
Another common way in which you may want to access email is via Thunderbird (also known as Icedove on Debian). This may be especially useful if you're trying to convert former Windows users who may previously have been using some version of Outlook.
</p>
<p>
The following instructions should be carried out on the client machines (laptop, etc), not on the BBB itself.
Install <b>Thunderbird</b> and <b>Enigmail</b>. How you do this just depends upon your distro and software manager or "app store".
</p>
<p>
Open Thinderbird
</p>
<p>
Select "<b>Skip this and use existing email</b>"
</p>
<p>
Enter your name, email address (myusername@mydomainname.com) and the password for your user.
</p>
<p>
You'll get a message saying "<i>Thunderbird failed to find the settings</i>"
</p>
<p>
The settings should be as follows, substituting <i>mydomainname.com</i> for your domain name and <i>myusername</i> for the username.
</p>
<ulclass="org-ul">
<li>Incoming: IMAP, mydomainname.com, 993, SSL/TLS, Normal Password</li>
<li>Outgoing: SMTP, mydomainname.com, 465, SSL/TLS, Normal Password</li>
<li>Username: myusername</li>
</ul>
<p>
Click <b>Done</b>.
</p>
<p>
Click <b>Get Certificate</b> and make sure "<b>permanently store this exception</b>" is selected", then click <b>Store Security Exception</b>.
</p>
<p>
From OpenPGP setup select "<b>Yes, I would like the wizard to get me started</b>". If the wizard doesn't start automatically then "setup wizard" can be selected from OpenPGP on the menu bar.
</p>
<p>
Select "<b>Yes, I want to sign all of my email</b>"
</p>
<p>
Select "<b>No, I will create per-recipient rules</b>"
Click on the Thunderbird menu, which looks like three horizontal bars on the right hand side.
</p>
<p>
Hover over <b>preferences</b> and then <b>Account settings</b>.
</p>
<p>
Select <b>OpenPGP Security</b> and make sure that <b>use PGP/MIME by default</b> is ticked. This will enable you to sign/encrypt attachments, HTML bodies and UTF-8 without any problems.
</p>
<p>
Select <b>Synchronization & Storage</b>.
</p>
<p>
Make sure that <b>Keep messages for this account on this computer</b> is unticked, then click <b>Ok</b>.
</p>
<p>
Click on <b>Inbox</b>. Depending upon how much email you have it may take a while to import the subject lines.
</p>
<p>
Note that when sending an email for the first time you will also need to accept the SSL certificate.
</p>
<p>
Get into the habit of using email encryption and encourage others to do so. Remember that you may not think that your emails are very interesting but the Surveillance State is highly interested in them and will be actively trying to data mine your private life looking for "suspicious" patterns, regardless of whether you are guilty of any crime or not.
By default you won't be able to see any folders which you may have created earlier using the <i>mailinglistrule</i> script. To make folders visible select:
</p>
<p>
<b>Menu</b>, hover over <b>Preferences</b>, select <b>Account Settings</b>, select <b>Server Settings</b> then click on the <b>Advanced</b> button.
</p>
<p>
Make sure that "<b>show only subscribed folders</b>" is not checked. Then click the <b>ok</b> buttons. Folders will be re-scanned, which may take some time depending upon how much email you have, but your folders will then appear.
Before trying to set up email on Android you may want to consider whether you really need to do this. Android (and its variants) is not a particularly secure operating system and whether or not you wish to store GPG keys on it depends on your threat model and in what situations you'll be using your device.
</p>
<p>
If you are going to use email on an Android device then ensure that you have full encryption enabled via the security settings, so that if you subsequently lose it, or if it gets stolen, the chances of encryption keys being exposed are minimised.
To get K9 working with Freedombone you'll need to install development versions of OpenKeychain and K9. At the time of writing the versions available in F-Droid do not support PGP/MIME or the "hidden recipient" feature of GPG. It is hoped that at some stage the patches will be integrated into the mainline or functionally equivalent changes made. Admittedly, this is not at all user friendly, but currently it's the only way to read Freedombone email on Android systems.
Select <b>settings</b>, <b>Account settings</b>, <b>OpenKeychain</b> and then select your key and press <b>Allow</b>. You should now be able to decrypt emails by entering your GPG passphrase.
</p>
<p>
You may also want to change the amount of time for which passwords are remembered, so that you don't need to enter your passphrase very often.
To view any new folders which you may have created using the <i>mailinglistrule</i> script from your inbox press the <b>K9 icon</b> at the top left to access folders, then press the <b>menu button</b> and select <b>refresh folder list</b>.
</p>
<p>
If your folder still doesn't show up then press the <b>menu button</b>, select <b>show folders</b> and select <b>all folders</b>.
Select <b>Email filtering rules</b> then <b>Add a user to a mailing list</b>. If you want to do it purely from the commandline then see the manpage for <b>freedombone-addlist</b>.
Select <b>Email filtering rules</b> then <b>Block/Unblock and email address</b> or <b>Block/Unblock email with subject line</b>. Also see the manpage for <b>freedombone-ignore</b>.
If you want to set up a public mailing list then when installing the system remember to set the <b>PUBLIC_MAILING_LIST</b> variable within <b>freedombone.cfg</b> to the name of your list. The name should have no spaces in it. Public mailing lists are unencrypted so anyone will be able to read the contents, including non subscribers.
</p>
<p>
To subscribe to your list send a cleartext email to:
Tip: When using the Mutt email client if you want to send an email in cleartext then press <b>p</b> (for PGP) on the sending screen and select <b>clear</b>. Unsecure email is treated as being the exception rather than the default.<sup><aid="fnr.1"class="footref"href="#fn.1">1</a></sup>
Photo by <ahref="https://www.flickr.com/photos/geishaboy500/2326873674/in/photolist-4xBQtC-6uHCJT-oBkgPg-oB7VnC-oBk2Ux-oB7LXS-oB7KeS-bSZiLK-cFssXu-ojQef5-oKRZxL-oKC3Ee-otpoLL-otpDnP-otpCnx-oKBZ4r-otp4U8-oKTLjk-oHRU19-otp3JJ-otp1GB-otoYme-otpcYU-otoXe5-otoWkm-otoVvq-oHRKsh-otoTkJ-otp7zh-otp6du-otp4YA-otp4km-oHRDgj-oHRC3C-otph7x-oHRAf9-otpeqv-otpdun-otoVbq-oKTmrk-oKTkvx-otoRPq-oHRs8N-oKBrSt-otoxTh-otouMX-otoHRG-otoYqF-oKBj28-oKReiy">THOR</a>, CC BY 2.0