summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2024-12-26 18:58:59 -0800
committerXiao Pan <xyz@flylightning.xyz>2024-12-26 18:58:59 -0800
commitfee7f1e36d099737351b8052012d7c3af1b7c289 (patch)
tree0e1682e79995f88f5b58afe840e7388c917b0071 /home
parent428a882bc1e9c84cb5e57ddcdfb576fa795a3603 (diff)
temp mutt and mbsync multi account config
Diffstat (limited to 'home')
-rw-r--r--home/xyz/.config/neomutt/mail4
-rw-r--r--home/xyz/.config/neomutt/mail24
-rw-r--r--home/xyz/.config/neomutt/neomuttrc19
-rw-r--r--home/xyz/.mbsyncrc40
4 files changed, 57 insertions, 10 deletions
diff --git a/home/xyz/.config/neomutt/mail b/home/xyz/.config/neomutt/mail
new file mode 100644
index 00000000..9c5df856
--- /dev/null
+++ b/home/xyz/.config/neomutt/mail
@@ -0,0 +1,4 @@
+set smtp_url='smtps://xyz@mail.flylightning.xyz'
+set folder="$XDG_DATA_HOME/mail/xyz@mail.flylightning.xyz"
+# need to put mailboxes here in each accuont, don't only put one in neomuttrc, else can't switch accounts
+mailboxes =INBOX =Sent =Drafts =Archive =Junk =Trash
diff --git a/home/xyz/.config/neomutt/mail2 b/home/xyz/.config/neomutt/mail2
new file mode 100644
index 00000000..82663aa8
--- /dev/null
+++ b/home/xyz/.config/neomutt/mail2
@@ -0,0 +1,4 @@
+set smtp_url='smtps://xyz@mail2.flylightning.xyz'
+set folder="$XDG_DATA_HOME/mail/xyz@mail2.flylightning.xyz"
+# need to put mailboxes here in each accuont, don't only put one in neomuttrc, else can't switch accounts
+mailboxes =INBOX =Sent =Drafts =Archive =Junk =Trash
diff --git a/home/xyz/.config/neomutt/neomuttrc b/home/xyz/.config/neomutt/neomuttrc
index 5f4996ac..6e59f808 100644
--- a/home/xyz/.config/neomutt/neomuttrc
+++ b/home/xyz/.config/neomutt/neomuttrc
@@ -17,12 +17,18 @@
# realname and spoolfile deprecated, use real_name and spool_file, also some other variable names, see:
# https://github.com/neomutt/neomutt/commit/a5eaeb51b14c484fa52f6f519446253dea5667ca
+source mail2
+# maybe useful for multiple accounts
+#folder-hook $folder 'source mail2'
+source mail
+#folder-hook $folder 'source mail'
+
# 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 smtp_url='smtps://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"
+#set folder="$XDG_DATA_HOME/mail/xyz@mail.flylightning.xyz"
# if fully online and not using mbsync:
#set folder='imaps://xyz@mail.flylightning.xyz'
@@ -39,7 +45,7 @@ set from='xyz@flylightning.xyz'
set real_name='Xiao Pan'
# this seems also determines sidebar mailbox order
-mailboxes =INBOX =Sent =Drafts =Archive =Junk =Trash
+#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
@@ -145,6 +151,7 @@ bind index,pager C noop
# g default to group-reply
bind index,pager g noop
bind index,pager R group-reply
+bind index,pager i noop
macro index,pager \'a "<change-folder>=Archive<enter>" "go to archive"
macro index,pager \'d "<change-folder>=Drafts<enter>" "go to drafts"
@@ -164,6 +171,12 @@ macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
+# not sure about what <check-stats> is for and if it is useful or not
+#macro index,pager ia '<sync-mailbox><enter-command>source mail<enter><change-folder>!<enter>;<check-stats>'
+macro index,pager ia '<sync-mailbox><enter-command>source mail<enter><change-folder>!<enter>'
+macro index,pager ib '<sync-mailbox><enter-command>source mail2<enter><change-folder>!<enter>'
+# maybe useful for multiple accounts
+#macro index c "<change-folder>?<change-dir><home>^K=<enter>"
macro index S "<shell-escape>mbsync -a<enter>" "sync email"
diff --git a/home/xyz/.mbsyncrc b/home/xyz/.mbsyncrc
index dd90d8a4..47356a43 100644
--- a/home/xyz/.mbsyncrc
+++ b/home/xyz/.mbsyncrc
@@ -4,7 +4,7 @@
# `man mbsync`
# https://github.com/LukeSmithxyz/mutt-wizard
-IMAPStore xyz@flylightning.xyz-remote
+IMAPStore xyz@mail.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
@@ -12,19 +12,45 @@ PassCmd "pass master3 | { IFS= read -r p; printf %s \"$p\";}"
TLSType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
-MaildirStore xyz@flylightning.xyz-local
+IMAPStore xyz@mail2.flylightning.xyz-remote
+Host mail2.flylightning.xyz
+User xyz
+# credit: GPL-2.0-or-later https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu
+PassCmd "pass master3 | { IFS= read -r p; printf %s \"$p\";}"
+TLSType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+MaildirStore xyz@mail.flylightning.xyz-local
+# man page says needed
+Subfolders Verbatim
+# trailing slash important?
+# seems $XDG_DATA_HOME does not work?
+Path ~/.local/share/mail/xyz@mail.flylightning.xyz/
+Inbox ~/.local/share/mail/xyz@mail.flylightning.xyz/INBOX
+
+MaildirStore xyz@mail2.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
+Path ~/.local/share/mail/xyz@mail2.flylightning.xyz/
+Inbox ~/.local/share/mail/xyz@mail2.flylightning.xyz/INBOX
+
+Channel xyz@mail.flylightning.xyz
+Expunge Both
+# old system use master and slave
+Far :xyz@mail.flylightning.xyz-remote:
+Near :xyz@mail.flylightning.xyz-local:
+# not sure if needed
+Patterns *
+Create Both
+SyncState *
-Channel xyz@flylightning.xyz
+Channel xyz@mail2.flylightning.xyz
Expunge Both
# old system use master and slave
-Far :xyz@flylightning.xyz-remote:
-Near :xyz@flylightning.xyz-local:
+Far :xyz@mail2.flylightning.xyz-remote:
+Near :xyz@mail2.flylightning.xyz-local:
# not sure if needed
Patterns *
Create Both