__________________________________________________
SSL/TLS, POP/SMTP with mutt (http://www.mutt.org)
configured for autistici.org
version 20060619
__________________________________________________
Goals:
– to read mail with mutt from POP via TLS/SSL
– to send authenticated mail via TLS/SSL withmutt+msmtp
Assumptions:
– you are already familiar with POP receiving in mutt
– you have already configured mutt to send mail with mutt+msmtp
– you have already an active account as USER@autistici.org and know your working PASSWORD
As I am not fully conscious of the underlying consequences and deep causes, I
post here my working solution, with some degree of redundancy and
verbosity.
The whole solution took some hours of recompiling/experimenting, with changes
of compile flags ( since I work on a Linux Gentoo system, I get the
flags of mutt and mutt and msmtp issuing ‘emerge -pv mutt msmtp’ and
compiling the programs with ‘USE=
Output of `mutt -v`:
#Mutt 1.5.11 (2005–09-15)
…
#System: Linux 2.6.16.17 (i686) [using ncurses 5.4] [using libidn 0.5.15
…
#Compile options:
#+USE_POP +USE_NNTP +USE_IMAP -USE_GSS -USE_SSL +USE_GNUTLS -USE_SASL
…
so, a mutt with pop and gnutls configured (and no USE_SSL nor USE_SASL).
Output of `msmtp—version`:
#msmtp version 1.4.0
#TLS/SSL library: GnuTLS
#Authentication library: GNU SASL
#Supported authentication methods:
#plain cram-md5 digest-md5 external login
#System configuration file name: /etc/msmtprc
so, a msmtp with GNUTLS and SASL, as opposed to the default ‘ssl’
Gentoo flag
1a) For reading via POP in mutt, add and customize the following line (join the
following!) in .muttrc, accustomating PASSWORD and USER terms:
macro index
pop_user
pop_host=mail.autistici.org
pop_user=USER@autistici.org
pop_pass=PASSWORD
pops://USER@autistici.org@mail.autistici.org
USER
USER’
1b) Append the autistici.org certificate for POP mail to
~/.mutt/certificates and add the following to .muttrc :
set certificate_file=~/.mutt/certificates
(or mutt wil prompt you to add the certificate automatically)
1c) Place the next in .muttrc ONLY if you have priority conflicts with other accounts :
set pop_authenticators=“digest-md5:apop:user”
2a) For sending, place this in your default .msmtprc:
account USER
port 587
from USER@autistici.org
user USER@autistici.org
auth on
password PASSWORD
tls on
tls_trust_file ~/ca.pem # download from http://ca.autistici.org/ca.pem
host smtp.autistici.org
tls_certcheck on
2b) Test your msmtp configuration by mailing a “foo” message to yourself :
echo foo | msmtp -a USER USER@autistici.org
3) If all of these works, take a break from the computer and enjoy your life,
Otherwise, you can find a better solution than this and let us know :)
__________________________________________________
Note that experimenting with this configuration, I
send mail without having the autistici.org
certificates working! It is not necessary.
This while receiving requires a certificate.
__________________________________________________
