-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmuttrc
135 lines (121 loc) · 5.98 KB
/
muttrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
set editor="emacsclient -nw"
#-----------#
# Passwords #
#-----------#
#set my_tmpsecret=`gpg2 -o ~/.sec/.tmp -d ~/.sec/pass.gpg`
#set my_gpass1=`awk '/personal/ {print $2}' ~/.sec/.tmp`
#set my_gpass2=`awk '/professional/ {print $2}' ~/.sec/.tmp`
#set my_gpass3=`awk '/work/ {print $2}' ~/.sec/.tmp`
#set my_del=`rm -f ~/.sec/.tmp`
source "gpg2 -dq ~/.sec/pass.gpg |"
#---------------#
# Account Hooks #
#---------------#
account-hook . "unset imap_user; unset imap_pass; unset tunnel" # unset first!
account-hook "imaps://[email protected]/" "\
set imap_user = [email protected] \
imap_pass = \"$my_gpass1\""
account-hook "imaps://[email protected]@imap.gmail.com/" "\
set imap_user = [email protected] \
imap_pass = $my_gpass2"
account-hook "imaps://[email protected]/" "\
set imap_user = [email protected] \
imap_pass = $my_gpass2"
#-------------------------------------#
# Folders, mailboxes and folder hooks #
#-------------------------------------#
# Setup for user1:
set folder = imaps://[email protected]/
mailboxes = +INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam =[Gmail]/Trash
set spoolfile = +INBOX
folder-hook imaps://[email protected]/ "\
set folder = imaps://[email protected]/ \
spoolfile = +INBOX \
postponed = +[Gmail]/Drafts \
record = +[Gmail]/'Sent Mail' \
from = 'Adam Washington <[email protected]> ' \
realname = 'Adam Washington' \
smtp_url = smtps://[email protected] \
smtp_pass = \"$my_gpass1\""
# Setup for user2:
set folder = imaps://[email protected]/
mailboxes = +INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam =[Gmail]/Trash
set spoolfile = +INBOX
folder-hook imaps://[email protected]/ "\
set folder = imaps://[email protected]/ \
spoolfile = +INBOX \
postponed = +[Gmail]/Drafts \
record = +[Gmail]/'Sent Mail' \
from = 'Adam Washington <[email protected]> ' \
realname = 'Adam Washington' \
smtp_url = smtps://[email protected] \
smtp_pass = $my_gpass2"
# Setup for user2:
set folder = imaps://[email protected]@imap.gmail.com/
mailboxes = +INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam =[Gmail]/Trash
set spoolfile = +INBOX
folder-hook imaps://[email protected]@imap.gmail.com/ "\
set folder = imaps://[email protected]@imap.gmail.com/ \
spoolfile = +INBOX \
postponed = +[Gmail]/Drafts \
record = +[Gmail]/'Sent Mail' \
from = 'Adam Washington <[email protected]> ' \
realname = 'Adam Washington' \
smtp_url = smtps://[email protected]@smtp.gmail.com \
smtp_pass = $my_gpass3"
folder-hook . "exec collapse-all"
#--------#
# Macros #
#--------#
macro index <F1> "y18<return><return>" # jump to mailbox number 12 (user1 inbox)
macro index <F2> "y12<return><return>" # jump to mailbox number 6 (user2 inbox)
macro index <F3> "y6<return><return>" # jump to mailbox number 6 (user2 inbox)
#-----------------------#
# Gmail-specific macros #
#-----------------------#
# to delete more than 1 message, just mark them with "t" key and then do "d" on them
macro index d ";s+[Gmail]/Trash<enter><enter>" "Move to Gmail's Trash"
# delete message, but from pager (opened email)
macro pager d "s+[Gmail]/Trash<enter><enter>" "Move to Gmail's Trash"
# undelete messages
macro index u ";s+INBOX<enter><enter>" "Move to Gmail's INBOX"
macro pager u "s+INBOX<enter><enter>" "Move to Gmail's INBOX"
macro index,pager a "<save-message>=[Gmail]/All Mail<enter><enter>" "Archive"
#-------------------------#
# Misc. optional settings #
#-------------------------#
# Check for mail every minute for current IMAP mailbox every 1 min
set timeout = 60
# Check for new mail in ALL mailboxes every 2 min
set mail_check = 120
# keep imap connection alive by polling intermittently (time in seconds)
set imap_keepalive = 300
# allow mutt to open new imap connection automatically
unset imap_passive
# store message headers locally to speed things up
# (the ~/.mutt folder MUST exist! Arch does not create it by default)
set header_cache = ~/.mutt/hcache
# sort mail by threads
set sort = threads
# and sort threads by date
set sort_aux = last-date-received
auto_view text/html
#Encryption
set pgp_use_gpg_agent = yes
set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
set pgp_autosign=no
#set pgp_sign_as=0xC9C40C31
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"