From 6d1aa5d05f4506efd4394e089a27e17d54a0b290 Mon Sep 17 00:00:00 2001 From: xinyz Date: Sun, 14 Jun 2020 22:28:11 +0800 Subject: [PATCH] add configuration for xinyongzhong@outlook.com --- common/pass/outlook-xinyongzhong.gpg.asc | 17 +++++++++++ mbsync/mbsyncrc | 36 ++++++++++++++++++++++++ msmtp/msmtprc | 12 ++++++++ mutt/accounts/outlook-xinyongzhong | 23 +++++++++++++++ mutt/muttrc | 9 ++++-- 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 common/pass/outlook-xinyongzhong.gpg.asc create mode 100644 mutt/accounts/outlook-xinyongzhong diff --git a/common/pass/outlook-xinyongzhong.gpg.asc b/common/pass/outlook-xinyongzhong.gpg.asc new file mode 100644 index 0000000..78936f0 --- /dev/null +++ b/common/pass/outlook-xinyongzhong.gpg.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP MESSAGE----- + +hQIMA2aMbQr8T6x3AQ/9HVcNCiYc1VcbBVB5dEBfwRC8pxsyZlrINiT+scD7tg9w +iAeKXf5Ja50tB4kjYXQTr91JStSB6MmxpTFBcHSlYeswZSIVRDhDw5BgRBAsjq8o +XpnDhq2Ja0ET33HClw7uQxFHOAZxyLIbkfBcqruDMH7ulCjAb74ugsIylTWWBTDy +pUYXafaegdZJmITt7JfG3QlRdmg9+7J5WKZ4IpMVG5dqR9yz+E88ijuEjqJzMF6t +dj3tPVtLTTbhbTKlhxM36I2HDHim6zg6yP8USR4ZhWKnGnWjMuZR5WULsORnOywX +IOp/ywbdDzaoFtpzHFgHNhz28lk5XQaWJdM9jVqTvTNSpsuZQN/0hyviyq4ebhow +1Oakt57hqyc3ATPx2hYJ3JCYsHg1AEyOWt5QZUA51n0Cm7wxoxC1TmZRIqgxo+ES +5PwoQ6/MOz7coV6o5y/3FH7jXlETJ+WaRJEFF6y/naRQ9E4uJEhYRxwVhCqog2g1 +d7bAE/a3q5nAyXFvhL/iJNvn9GtEwvPukz1x2MWo3XnN9j/ryMhtIs74qBjw2QNu +G5kJ9kFIbLMlL4kEabcFavUeO5iddoRNQK7GA+iqZdyV5vz1AmW8Rj5A5fbG9xvw +mnLMA/oQSbkoCPmucYNgF5PLnqQ73YX0VUZ4+GoL0c5KyRc4/QEyN1N4fkbm4LTS +SAH2Tj1dwYnLa7oU4/bgoawlUT+AM7JxeLyKamHw2HkdXPpoRBLb46n/NhAYqjz6 +CbWBhywYqMKBw8PZyGIV/hyd2VtV+q5MLQ== +=jmup +-----END PGP MESSAGE----- diff --git a/mbsync/mbsyncrc b/mbsync/mbsyncrc index 60b64c3..3efa535 100644 --- a/mbsync/mbsyncrc +++ b/mbsync/mbsyncrc @@ -113,3 +113,39 @@ Channel hotmail-junk Channel hotmail-drafts Channel hotmail-trash +################################# +# Account outlook-xinyongzhong # +################################# + +IMAPAccount outlook-xinyongzhong +Host imap-mail.outlook.com +User xinyongzhong@outlook.com +PassCmd "gpg -r xinyz --quiet -d ~/dotfiles/common/pass/outlook-xinyongzhong.gpg.asc" +SSLType IMAPS +SSLVersions TLSv1.2 + +# Remote storage +IMAPStore outlook-xinyongzhong-remote +Account outlook-xinyongzhong + +# Local storage +MaildirStore outlook-xinyongzhong-local +Path ~/Mail/outlook-xinyongzhong/ +Inbox ~/Mail/outlook-xinyongzhong/INBOX + +Channel outlook-xinyongzhong-inbox +Master :outlook-xinyongzhong-remote:"Inbox" +Slave :outlook-xinyongzhong-local:INBOX +Create Both +Expunge Both + +Channel outlook-xinyongzhong-junk +Master :outlook-xinyongzhong-remote:"Junk" +Slave :outlook-xinyongzhong-local:junk +Create Both +Expunge Both + +Group outlook-xinyongzhong +Channel outlook-xinyongzhong-inbox +Channel outlook-xinyongzhong-junk + diff --git a/msmtp/msmtprc b/msmtp/msmtprc index 4d9f33f..7ba4f44 100644 --- a/msmtp/msmtprc +++ b/msmtp/msmtprc @@ -26,3 +26,15 @@ tls on tls_starttls on tls_certcheck off +account outlook-xinyongzhong +host smtp.live.com +port 587 +protocol smtp +auth on +user xinyongzhong@outlook.com +passwordeval "gpg -r xinyz --quiet -d ~/dotfiles/common/pass/outlook-xinyongzhong.gpg.asc" +from xinyongzhong@outlook.com +tls on +tls_starttls on +tls_certcheck off + diff --git a/mutt/accounts/outlook-xinyongzhong b/mutt/accounts/outlook-xinyongzhong new file mode 100644 index 0000000..14f30db --- /dev/null +++ b/mutt/accounts/outlook-xinyongzhong @@ -0,0 +1,23 @@ +set from = "xinyongzhong@outlook.com" +set sendmail = "/usr/local/bin/msmtp -a outlook-xinyongzhong" + +# Set folders +set spoolfile = "+outlook-xinyongzhong/INBOX" +set postponed = "+outlook-xinyongzhong/INBOX" +set record = "+outlook-xinyongzhong/INBOX" +set trash = "+outlook-xinyongzhong/INBOX" + +color status cyan default + +macro index o "mbsync outlook-xinyongzhong" "run mbsync to sync mail for this account" + +macro index,pager s \ + "set my_old_resolve=\$resolve noresolve\ + nset resolve=\$my_old_resolve\ + +outlook-xinyongzhong/junk" \ + "mark as read and move to junk folder" + +macro index,pager i \ + "+outlook-xinyongzhong/INBOX" \ + "move message to the inbox" + diff --git a/mutt/muttrc b/mutt/muttrc index 78a5f29..b876eb7 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -72,17 +72,19 @@ auto_view text/html set sidebar_visible set sidebar_short_path set sidebar_folder_indent -set sidebar_width = 25 +set sidebar_width = 26 set sidebar_divider_char = ' | ' set sidebar_indent_string = ' '' set sidebar_format = "%B %* [%?N?%N / ?%S]" # Mailboxes to show in the sidebar. # mailboxes =airocpss -named-mailboxes airoccpss-INBOX =airocpss/INBOX +named-mailboxes airoccpss =airocpss/INBOX mailboxes =airocpss/sent =airocpss/drafts =airocpss/junk =airocpss/trash -named-mailboxes hotmail-INBOX =hotmail/INBOX +named-mailboxes hotmail =hotmail/INBOX mailboxes =hotmail/sent =hotmail/drafts =hotmail/junk =hotmail/trash +named-mailboxes ok-xinyz =outlook-xinyongzhong/INBOX +mailboxes =outlook-xinyongzhong/junk # source colors and keybindings # keeping those in one place makes it easier for my brain @@ -100,4 +102,5 @@ source ~/.mutt/accounts/airocpss # when changing into other mailboxes, use different adresses etc. folder-hook airocpss/* source ~/.mutt/accounts/airocpss folder-hook hotmail/* source ~/.mutt/accounts/hotmail +folder-hook hotmail/* source ~/.mutt/accounts/outlook-xinyongzhong