en:ressources:astuces:mutt_macosx
Table of Contents
Installing and configuring Mutt on MacOSX
Mutt 1.5.20 on Mac OS X snow leopard.
1. Get mutt and patch it
$ wget ftp://ftp.mutt.org/mutt/devel/mutt-1.5.20.tar.gz $ tar -xzvf mutt-1.5.20.tar.gz $ cd mutt-1.5.20
Download and apply sidebar patch
$ curl -O http://lunar-linux.org/~tchan/mutt/patch-1.5.20.sidebar.20090619.txt $ patch -p1 < patch-1.5.20.sidebar.20090619.txt
Build mutt :
$ ./configure --prefix=/opt/local/ --with-curses --with-regex --enable-locales-fix --enable-pop --enable-imap --enable-smtp --enable-hcache --with-ssl --mandir=/opt/local/ $ make $ sudo make install
.muttrc
set realname="Julien Vehent" set from="julienv@example.com" set use_from="yes" set sendmail="/opt/local/bin/esmtp -v -X ~/.esmtp/log-`date +%F`" set envelope_from="yes" ignore * unignore Date: From: To: \ Cc: Reply-To: Subject: Mail-Followup-To: hdr_order Date: From: To: \ Cc: Reply-To: Subject: Mail-Followup-To: set editor="vim" set edit_headers=no set include=yes set markers=no set fast_reply=yes set pager_index_lines=20 set pager_context=1 set menu_scroll # sidebar ===== set sidebar_width=30 set sidebar_visible=yes # ctrl-n, ctrl-p to select next, prev folder # ctrl-o to open selected folder bind index \CP sidebar-prev bind index \CN sidebar-next bind index \CO sidebar-open bind pager \CP sidebar-prev bind pager \CN sidebar-next bind pager \CO sidebar-open color sidebar_new black red set folder="imaps://julienv@mail1.example.com" set spoolfile="imaps://julienv@mail1.example.com/INBOX" set mbox="!" set sort=threads set sort_browser=reverse-date set sort_aux=last-date-received set record="=INBOX.Sent Messages" set postponed="=INBOX.Drafts" #set trash="=INBOX.Deleted Messages" unset imap_passive set imap_check_subscribed set mail_check=60 set timeout=30 set header_cache = "~/.mutt/mail/imap-aweber-cache" set net_inc=5 set message_cachedir = "~/.mutt/mail/imap-aweber-message" # ===================================================================== # Normal colors # ===================================================================== color normal white black color message white black color hdrdefault cyan black color attachment yellow black # # # ===================================================================== # Index # ===================================================================== # # Messages already replied to in cyan color index cyan black "~Q" # # Unread messages in yellow color index brightyellow black "~N" color index brightyellow black "~O" # # Deleted messages in a dark color color index blue black "~D" # # Flagged messages in red color index brightred black "~F" # # # ===================================================================== # Header # ===================================================================== # # Color information about the sender color header brightcyan black "From: " color header brightcyan black "Subject: " color header brightcyan black "date: " # # # ===================================================================== # Body # ===================================================================== # # Color the first levels of quoted text color quoted green black color quoted1 cyan black color quoted2 green black color quoted3 cyan black # # # GnuPG output # # Make if very obvious there is a bad signature! color body black red "BAD signature .*$" # # Tag a good signature color body brightgreen black "Good signature .*$" # # Inform the signature can't be verified color body brightred black "Can't check signature: public key not found" color body brightred black "WARNING: .*!" color body brightred black "some signal caught ... exiting"
esmtp
To send email, mutt can use esmtp with the following ~/.esmtprc file.
identity julienv@example.com hostname mail1.example.com:1337 username "julienv" password "turlututu"
If your server uses SSL or TLS on smtp connection, put the certificate in ~/.authenticate/ca.pem
$ openssl s_client -connect mail1.example.com:993 [...] CONNECTED(00000003) depth=1 /C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA verify error:num=20:unable to get local issuer certificate verify return:0 --- Certificate chain 0 s:/serialNumber=PNkItnJ-soLix4bzCWfM9CPp08oAEgmf/C=US/ST=Pennsylvania/L=Huntingdon Valley/O=AWeber Systems, Inc./CN=*.aweber.com i:/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA 1 s:/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA --- Server certificate -----BEGIN CERTIFICATE----- MIIEizCCA3OgAwIBAgIDAIHkMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM IENBMB4XDTExMDQwMjIxNTU1MloXDTEyMDQwNTAyMTUzNVowgaExKTAnBgNVBAUT IFBOa0l0bkotc29MaXg0YnpDV2ZNOUNQcD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UkVuBp9kbYt2/7eScOGWFsu4EJquTrBKuWi/sHA4pOqFi+XlbZBKaSRNB4 QAfJvjIXgo0uydapTKZRZJR8OgxJWJN5UaqRjLXI+KfGiP2i53EueDNuPn3BMiGZ D3c6EyEVaAQmjLmK+yALBXDfm/Q3yWgfZ455WHMTapu9Tvfw/elpE1BQ/dgZf5g5 wNlEZUAhkj79nnQsP4Sgxe8+mgH9Um+/e53hr7q8RuJ2Vw85n+dFsNEh7fuazLxS oGMKDOkBMpESzCCiaJcV -----END CERTIFICATE----- subject=/serialNumber=PNkItnJ-soLix4bzCWfM9CPp08oAEgmf/C=US/ST=Pennsylvania/L=Huntingdon Valley/O=AWeber Systems, Inc./CN=*.aweber.com issuer=/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA
Take the b64 section and store it in ~/.authenticate/ca.pem:
$ cat .authenticate/ca.pem -----BEGIN CERTIFICATE----- MIIEizCCA3OgAwIBAgIDAIHkMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM IENBMB4XDTExMDQwMjIxNTU1MloXDTEyMDQwNTAyMTUzNVowgaExKTAnBgNVBAUT IFBOa0l0bkotc29MaXg0YnpDV2ZNOUNQcDA4b0FFZ21mMQswCQYDVQQGEwJVUzEV MBMGA1UECBMMUGVubnN5bHZhbmlhMRowGAYDVQQHExFIdW50aW5nZG9uIFZhbGxl eTEdMBsGA1UEChMUQVdlYmVyIFN5c3RlbXMsIEluYy4xFTATBgNVBAMMDCouYXdl YmVyLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOkh7WqBXQ9 o9Urj37bkGhScVo5+QKaugnw9takHUpcWcOXg/wGT268vQbPV1BcejkgX3k4ziDz Fq8PEaFE20VS0193YNBBRdHu3GROSZX5L4YKX5mHSscp3e7m7Bkrcv35opK/MURW Gda5AUqgzvFjciKcyuT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