summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-04-12 03:36:56 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-04-12 03:36:56 -0700
commitc23b77b3c379639a7c9dce0e970bf45e299ef70a (patch)
tree2db26365a4ead1b935a8977bacd446d05fed7603
parent9d545cb5f9de53285b74de1f5a871f5b8373caf5 (diff)
neomutt isync and abook configs; backup abook
-rw-r--r--home/xyz/.abook/abookrc14
-rw-r--r--home/xyz/.config/myconf/pacman_Qqme1
-rw-r--r--home/xyz/.config/myconf/pacman_Qqne1
-rw-r--r--home/xyz/.config/myconf/upd_rsync_files1
-rw-r--r--home/xyz/.config/neomutt/neomuttrc38
-rw-r--r--home/xyz/.mbsyncrc31
6 files changed, 78 insertions, 8 deletions
diff --git a/home/xyz/.abook/abookrc b/home/xyz/.abook/abookrc
new file mode 100644
index 00000000..59b2081d
--- /dev/null
+++ b/home/xyz/.abook/abookrc
@@ -0,0 +1,14 @@
+# bad default coloring, I dislike
+#set use_colors=true
+
+# '$BROWSER' does not work
+set www_command="$BROWSER"
+
+set index_format=" {name:22} {email:30} {phone:14|workphone|mobile|fax|misc_phones}"
+
+field misc_phones = "Misc Phones", list
+
+view CONTACT = name, email
+view ADDRESS = address, address2, city, state, zip, country
+view PHONE = phone, workphone, fax, mobile, misc_phones
+view OTHER = nick, url, notes, anniversary, groups
diff --git a/home/xyz/.config/myconf/pacman_Qqme b/home/xyz/.config/myconf/pacman_Qqme
index 126898ad..2b2f57e0 100644
--- a/home/xyz/.config/myconf/pacman_Qqme
+++ b/home/xyz/.config/myconf/pacman_Qqme
@@ -1,3 +1,4 @@
+abook
absolutely-proprietary
adplug
apulse
diff --git a/home/xyz/.config/myconf/pacman_Qqne b/home/xyz/.config/myconf/pacman_Qqne
index 0a6ea688..90ab7160 100644
--- a/home/xyz/.config/myconf/pacman_Qqne
+++ b/home/xyz/.config/myconf/pacman_Qqne
@@ -74,6 +74,7 @@ intel-ucode
ioping
iotop-c
iperf3
+isync
java-commons-lang
jq
jupyter-notebook
diff --git a/home/xyz/.config/myconf/upd_rsync_files b/home/xyz/.config/myconf/upd_rsync_files
index 5aeec592..b76ceeb8 100644
--- a/home/xyz/.config/myconf/upd_rsync_files
+++ b/home/xyz/.config/myconf/upd_rsync_files
@@ -1,3 +1,4 @@
+/home/xyz/.abook/addressbook
/home/xyz/.bitmonero/wallets
/home/xyz/.config/qBittorrent
/home/xyz/.config/qmmp/qmmp.conf
diff --git a/home/xyz/.config/neomutt/neomuttrc b/home/xyz/.config/neomutt/neomuttrc
index a88aa92d..44bd5474 100644
--- a/home/xyz/.config/neomutt/neomuttrc
+++ b/home/xyz/.config/neomutt/neomuttrc
@@ -3,6 +3,7 @@
# https://wiki.archlinux.org/title/Mutt
# https://videos.lukesmith.xyz/
# https://docs.kernel.org/process/email-clients.html
+# https://blog.flaport.net/configuring-neomutt-for-email.html
# maybe useful:
# `man neomuttrc`
@@ -16,8 +17,12 @@
# 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'
+# mbox_type not sure if needed, maybe needed because isync/mbsync set to use maildir format
+set mbox_type=Maildir
+set folder="$XDG_DATA_HOME/mail/xyz@flylightning.xyz"
+# if fully online and not using mbsync:
+#set folder='imaps://xyz@mail.flylightning.xyz'
# https://wiki.archlinux.org/title/Mutt#Pass
# need "" instead of ''?
@@ -31,11 +36,12 @@ 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
+# this seems also determines sidebar mailbox order
+mailboxes =INBOX =Sent =Drafts =Archive =Junk =Trash
+# if fully online and use `set folder="imaps://xyz@mail.flylightning.xyz"` instead:
+# default not auto subscribe to inbox? need `mailboxes =INBOX` at least
+#mailboxes =INBOX
+#set imap_check_subscribed
# spool_file not sure if needed
# + seems mean remote?
@@ -73,6 +79,7 @@ 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'
+set sidebar_short_path
# needed for some sidebar features
set mail_check_stats
@@ -82,8 +89,12 @@ set mail_check=60
# no ask auto save to draft
set postpone='yes'
-# not sure if useful
-set mbox_type = Maildir
+set query_command="abook --mutt-query '%s'"
+# https://neomutt.org/guide/advancedusage#8-%C2%A0external-address-queries
+# completion when ask for address input
+# default ^T
+# another way is Q, it will let me select an address from abook and start a new email
+bind editor <Tab> complete-query
# maybe:
# maybe, from mutt-wizard:
@@ -97,3 +108,14 @@ set mbox_type = Maildir
#set forward_format = "Fwd: %s"
# can configure mailcap configs ~/.mailcap to use lynx to auto show html with lynx
#auto_view text/html
+
+# navigation settings
+bind index,pager g noop
+macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
+macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
+macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
+macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
+macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
+macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
+# synchronization settings ['S' to sync]
+macro index S "<shell-escape>mbsync -a<enter>" "sync email"
diff --git a/home/xyz/.mbsyncrc b/home/xyz/.mbsyncrc
new file mode 100644
index 00000000..7bceeb89
--- /dev/null
+++ b/home/xyz/.mbsyncrc
@@ -0,0 +1,31 @@
+# references:
+# /usr/share/doc/isync/examples/mbsyncrc.sample
+# https://wiki.archlinux.org/title/Isync
+# `man mbsync`
+# https://github.com/LukeSmithxyz/mutt-wizard
+
+IMAPStore xyz@flylightning.xyz-remote
+Host mail.flylightning.xyz
+User xyz
+# credit: GPL-2.0-or-later https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu
+PassCmd "pass master2 | { IFS= read -r p; printf %s \"$p\";}"
+SSLType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+MaildirStore xyz@flylightning.xyz-local
+# man page says needed
+Subfolders Verbatim
+# trailing slash important?
+# seems $XDG_DATA_HOME does not work?
+Path ~/.local/share/mail/xyz@flylightning.xyz/
+Inbox ~/.local/share/mail/xyz@flylightning.xyz/INBOX
+
+Channel xyz@flylightning.xyz
+Expunge Both
+# old system use master and slave
+Far :xyz@flylightning.xyz-remote:
+Near :xyz@flylightning.xyz-local:
+# not sure if needed
+Patterns *
+Create Both
+SyncState *