[知其然不知其所以然-33] How to set up mutt

来源:互联网 发布:java random 1到100 编辑:程序博客网 时间:2024/05/19 15:41

Mutt is a useful lightweight imap/smtp client, here's how to set up:

1.

mkdir -p ~/.mutt/cache/headersmkdir ~/.mutt/cache/bodiestouch ~/.mutt/certificates
touch ~/.mutt/muttrc

2.

set imap_user = 'email address'set imap_pass = 'xxx'set spoolfile = imaps://imapmail.intel.com/INBOXset folder = imaps://imapmail.intel.com/set record="imaps://imapmail.intel.com/[ChenYu]/Sent"set postponed="imaps://imapmail.intel.com/[ChenYu]/Sent"set mbox="imaps://imapmail.intel.com/[ChenYu]/Inbox"# ================  SMTP  ====================set smtp_url = "smtp://smtp.intel.com:25/"set smtp_pass = $imap_passset ssl_force_tls = no # No encrypted connection# ================  Composition  ====================set editor = vimset edit_headers = yes  # See the headers when editingset charset = UTF-8     # value of $LANG; also fallback for send_charset# Sender, email address, and sign-off line must matchunset use_domain        # because joe@localhost is just embarrassingset realname = "Chen Yu"set from = "email address"set use_from = yesbind index "G" imap-fetch-mail

After using mutt, you can paste your patch to your reply very easily, since you can use

vim as editor, you just need to ":read xx.diff" and then you can reply a patch to the developers.


OK after buying an account of expressVPN, I can manage to set up mutt on my home ubuntu 16.04 with

access to gmail, here's my muttrc:


set ssl_starttls=yesset ssl_force_tls=yesset imap_user = 'xxx@gmail.com'set imap_pass = 'application password'set from='xxx@gmail.com'set realname='Yu Chen'set folder = imaps://imap.gmail.com/set spoolfile = imaps://imap.gmail.com/Inboxset postponed="imaps://imap.gmail.com/[Gmail]/Drafts"set header_cache = "~/.mutt/cache/headers"set message_cachedir = "~/.mutt/cache/bodies"set certificate_file = "~/.mutt/certificates"set smtp_url = 'smtps://xxx@smtp.gmail.com:465/'set move = noset imap_keepalive = 900set editor="vim"
set sort=threadsset sort_browser=reverse-dateset sort_aux = reverse-date-received


I use below mutt configs to highlight emails to/cc me.You can change "brightgreen" to any other colors you like.## Highlight for items Sent TO/CC mecolor index brightgreen default ~p  # To me> Cool, it works!> What does 'default ~p' mean? If I want to highlight> email send from 'linux-pm@vger.org', how to do that?'~p' means messages addressed to you.You could use "~f linux-pm@vger.org" Example:color index cyan default "~f linux-pm@vger.org"~f EXPR:   messages originating from EXPR

Notice, since the gmail uses a 2-step certification, we have to use application password to

access the account:

https://myaccount.google.com/security

0 0
原创粉丝点击