summaryrefslogtreecommitdiff
path: root/home/xyz/.config/neomutt/neomuttrc
blob: a88aa92d972b4d5dffb17b5880594e010d37843d (plain)
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
# references:
# https://github.com/LukeSmithxyz/mutt-wizard
# https://wiki.archlinux.org/title/Mutt
# https://videos.lukesmith.xyz/
# https://docs.kernel.org/process/email-clients.html

# maybe useful:
# `man neomuttrc`
# `man neomutt`
# /etc/neomutt
# https://neomutt.org/guide/gettingstarted.html
# /usr/share/doc/neomutt/optionalfeatures.html

# realname and spoolfile deprecated, use real_name and spool_file, also some other variable names, see:
# https://github.com/neomutt/neomutt/commit/a5eaeb51b14c484fa52f6f519446253dea5667ca

# note the imaps:// and smtps://, maybe more secure?
# note: xyz@flylightning.xyz will not work, need mail.flylightning.xyz, maybe because they require the actual imaps and smtps email server DNS
set folder='imaps://xyz@mail.flylightning.xyz'
set smtp_url='smtps://xyz@mail.flylightning.xyz'

# https://wiki.archlinux.org/title/Mutt#Pass
# need "" instead of ''?
# Just `pass show xxx` also works. My xxx password also has lines of other info I do not want to output
# credit: GPL-2.0-or-later https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu
# pipe to `head -n1` also works, it seems it will auto strip out \n newline char?
set imap_pass="`pass show master2 | { IFS= read -r p; printf %s \"$p\";}`"
set smtp_pass="`pass show master2 | { IFS= read -r p; printf %s \"$p\";}`"

set from='xyz@flylightning.xyz'
# /etc/neomuttrc says if use from var this will not use? not sure if works
set real_name='Xiao Pan'

# default not auto subscribe to inbox? need this
mailboxes =INBOX
set imap_check_subscribed
# or:
#mailboxes =INBOX =Sent =Trash =Drafts =Junk =Archive

# spool_file not sure if needed
# + seems mean remote?
set spool_file='+INBOX'
set record='+Sent'
set trash='+Trash'
set postponed='+Drafts'

# `man neomuttrc.5` says "Header caching can greatly improve speed when ..."
set header_cache="$XDG_CACHE_HOME/mutt"
set message_cache_dir="$XDG_CACHE_HOME/mutt"

# Allow Mutt to open a new IMAP connection automatically.
unset imap_passive

set attach_save_dir="$XDG_DOWNLOAD_DIR"
set attach_save_without_prompting

# linux kernel mailing list rules:
set send_charset="us-ascii:utf-8"
# Sender, email address, and sign-off line must match
# because joe@localhost is just embarrassing
unset use_domain

# about pgp:
#auto_view application/pgp-encrypted
# maybe use account-hook or folder-hook to `unset crypt_auto_sign` for accounts I do not wish to auto sign
set crypt_auto_sign
set pgp_default_key='FDA389A17B94BCE0E2FA3D71842BFD347BE06812'
# maybe useful: crypt_opportunistic_encrypt, crypt-hook

# https://neomutt.org/guide/gettingstarted#2-4-%C2%A0sidebar
set sidebar_visible
set sidebar_width=20
# manpage suggested
# %<... is nested if, see https://neomutt.org/feature/nested-if
set sidebar_format='%B%<F? [%F]>%* %<N?%N/>%S'
# needed for some sidebar features
set mail_check_stats

# to avoid lags using IMAP with some email providers (yahoo for example)
set mail_check=60

# no ask auto save to draft
set postpone='yes'

# not sure if useful
set mbox_type = Maildir

# maybe:
# maybe, from mutt-wizard:
# maybe add configs from mutt-wizard:
# - add Maildir configs? see arch wiki and mutt-wizard, not fully understood
# - mime type configs
# - other configs
# seems not working with this:
#set smtp_authenticators='gssapi:login'
#set forward_attachments=yes
#set forward_format = "Fwd: %s"
# can configure mailcap configs ~/.mailcap to use lynx to auto show html with lynx
#auto_view text/html