Projects - Mutt life
Small but very powerful text-based mail client for Unix operating systems makes everything relaxed. And the combination of mutt+esmtp+fetchmail made my life colorful.
However, if you are using Slackware Linux, you are lucky to get the fruit:
Besides, you need wvHtml to convert MS word file to Html file.
Refer to SoftwareInstall to get the idea of that. But for slackware users it's easy to do:
#installpkg xxx.tgz #removepkg xxx.tgz
The first thing you should do is to configure the mail server according to your mail provider such as Gmail, Yahoo, etc. To configure this just search "pop configure" with the mail server provider to get the answer, however, some mail servers like Gmail need SSL and TLS certification, so here gives the step to get this.
$openssl s_client -connect smtp.gmail.com:995 -showcertsoutput
CONNECTED(00000003) depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com verify error:num=27:certificate not trusted verify return:1 depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority -----BEGIN CERTIFICATE----- MIIC3TCCAkagAwIBAgIDBZIAMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0 aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDUxMTE1MjEyMjQ0WhcNMDcxMTE2MjEyMjQ0 WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN TW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xFjAUBgNVBAMTDXBv cC5nbWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMP8LCYiLGJ/ RihwcOi1V/zHVTw0Gfu+mI141Vjuuj2DtQoav8emwlXbu8gZoKP9GeMWpX1Vo9qN 4gkslIToHmDnIwGjcaEAfpdhSR9g54Kf5Y7BEXVyco6mTIlpe9vsbV0dmB1FvLP2 1N09dkUJfi7V0fjb8mcn3QYu6+6QNoxPAgMBAAGjga4wgaswDgYDVR0PAQH/BAQD AgTwMB0GA1UdDgQWBBTdASsopgao1m8hcEg0cDZhucltljA6BgNVHR8EMzAxMC+g LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDAf BgNVHSMEGDAWgBRI5mj5K9KylddH2CMgEE8zmJCf1DAdBgNVHSUEFjAUBggrBgEF BQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEAln3/pVqYnUXA1TVGzOqX LFhohGxpuNkr1UJnQmYxmZeB07uPBYRX8c0JXEKs29TmAHRsLhmp8kF36F11Dxgi Xm/Y8I9zgWHoMj7SL3Ve/u8K8K7XcUyUuaWmldLQAREafpFy+f+KYHGuAVh8hjy6 XyPlMCqj+PNp8QXjgOcgO68= -----END CERTIFICATE----- --- Server certificate subject=/C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com issuer=/C=US/O=Equifax/OU=Equifax Secure Certificate Authority --- No client certificate CA names sent --- SSL handshake has read 891 bytes and written 338 bytes --- New, TLSv1/SSLv3, Cipher is DES-CBC3-SHA Server public key is 1024 bit SSL-Session: Protocol : TLSv1 Cipher : DES-CBC3-SHA Session-ID: CFCAB44667A90184C8ABCC6F4D2D1C8EC29A9DBDAD11D815E7E22DC5E34213F6 Session-ID-ctx: Master-Key: 1AFCF4EC31DF0A5930B527BDC55B86D69285DD044E939BDDF18884F61F1E8340EFE7BF85CC50F98F657FB0579CF612F7 Key-Arg : None Start Time: 1134601370 Timeout : 300 (sec) Verify return code: 21 (unable to verify the first certificate) --- +OK Gpop m2pf1356431nzf ready.copy the content between
-----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- (including them) to a new file gmail.pem in the new directory $HOME/.certs. ($HOME/.certs/gmail.pem)$openssl x509 -in gmail.pem -noout -fingerprintthen add Fingerprint to the file gmail.pem as follows:
MD5 Fingerprint: 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E1:1B:EC4 PEM Data: -----BEGIN CERTIFICATE----- ...... -----END CERTIFICATE-----Add a new file named equifax.pem in $HOME/.certs/ with the following content:
MD5 Fingerprint: 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4 PEM Data: -----BEGIN CERTIFICATE----- MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1 MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 -----END CERTIFICATE-----
$ c_rehash ~/.certs
$openssl s_client -connect pop.gmail.com:995 -CApath .certs/if output conclude
Verify return code: 0 (ok)then it's fine.
# FlyZhy's personal .fetchmailrc # esmtp defaults mda "/usr/local/bin/esmtp -f %F %T" # # Sample /home/flyzhy/.fetchmailrc file for Gmail # # Check mail every 90 seconds set daemon 90 set syslog set postmaster flyzhy #set bouncemail # To keep mail on the server use the you would put keep at the end. poll pop.gmail.com with proto POP3 uidl and options no dns user 'zhenghaiyong@gmail.com' with pass "password" is 'flyzhy' here options ssl sslcertck sslcertpath '/home/flyzhy/.certs' keep
identity zhenghaiyong@gmail.com
hostname = smtp.gmail.com
username = "zhenghaiyong"
password = "password"
starttls = enabled
default
#
# another mail
identity flyzhy.org@gmail.com
hostname = smtp.gmail.com
username = "flyzhy.org"
password = "password"
starttls = enabled
#
mda "/usr/bin/procmail -d %T"
I mainly used the mutt.tar.gz from Sucha, download it then
$ mv mutt.tar.gz ~/ $ cd ~/ $ tar xzvf mutt.tar.gz && rm mutt.tar.gz $ less README (get more information)
At last, add the following sentence to $HOME/.bash_profile to start up fetchmail after booting the system:
! ps aux | grep -q fetchmail && fetchmail &
In fact, it's easy to understand how to configure them according to the manual page, so just test by yourself.
| Keyboard | Glance |
|---|---|
| p | Printing messages |
| <Tab> | next new message |
| Getting around in the menu | ©¤©¤ |
| k | up |
| j | down |
| PageUp | Page Up |
| PageDown | Page Down |
| 28 <enter> | goto message number 28 |
| * | goto last message |
| = | goto first message |
| Searching for a word | ©¤©¤ |
| /word | search forward subjects for "word" |
| <Esc> /word | search backward subjects for "word" |
| <Esc>b word | search the message itself for "word" |
| n | move on to the next message containing the "word" |
| Reading messages | ©¤©¤ |
| <space> | move down a page |
| - | move back up a page |
| i | return to the menu |
| Deleting messages | ©¤©¤ |
| d | delete the message |
| u | undelete the message |
| Others | ©¤©¤ |
| m | Sending messages |
| r | Replying to messages |
| f | Forwarding messages |
| s | Saving messages |