From: Samir Benmendil Date: Mon, 16 Mar 2020 00:28:17 +0000 (+0000) Subject: mail: use mailfence as the default inbox X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/653437cf2b2ba1daa275af7c355c559fd1750bfe mail: use mailfence as the default inbox --- diff --git a/mbsync/config b/mbsync/config index 189e39b..a51b7a6 100644 --- a/mbsync/config +++ b/mbsync/config @@ -4,6 +4,56 @@ Expunge Both Create Both CopyArrivalDate yes +IMAPAccount mailfence +Host imap.mailfence.com +User samirbenmendil +PassCmd "sed -En '/imap.mailfence.com.*samirbenmendil/ s/.*password (.*)/\\1/p' ~/.netrc" +AuthMechs LOGIN +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +IMAPStore mailfence-remote +Account mailfence + +MaildirStore mailfence-local +Path ~/mail/mailfence/ +Inbox ~/mail/mailfence/inbox +SubFolders Verbatim + +Channel mailfence-inbox +Master :mailfence-remote: +Slave :mailfence-local: +Patterns INBOX + +Channel mailfence-drafts +Master :mailfence-remote:"Drafts" +Slave :mailfence-local:"drafts" + +Channel mailfence-sent +Master :mailfence-remote:"Sent Items" +Slave :mailfence-local:"sent" + +Channel mailfence-spam +Master :mailfence-remote:"Spam?" +Slave :mailfence-local:"spam" + +Channel mailfence-bin +Master :mailfence-remote:"Trash" +Slave :mailfence-local:"trash" + +Channel mailfence-archive +Master :mailfence-remote: +Slave :mailfence-local: +Patterns archive* + +Group mailfence +Channel mailfence-inbox +Channel mailfence-drafts +Channel mailfence-sent +Channel mailfence-spam +Channel mailfence-bin +Channel mailfence-archive + IMAPAccount gmail Host imap.gmail.com User samir.benmendil@gmail.com diff --git a/msmtprc b/msmtprc index 72b1322..dd22358 100644 --- a/msmtprc +++ b/msmtprc @@ -3,6 +3,19 @@ tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt logfile ~/.msmtp/msmtp.log +# mailfence +account mailfence +host smtp.mailfence.com +protocol smtp +tls on +# no plaintext negotiations, straight into tls +tls_starttls off +port 465 +auth on +user samirbenmendil +passwordeval "pass mailfence.com/smtp" +from me@rmz.io + # gmail account gmail host smtp.gmail.com @@ -33,4 +46,4 @@ user samir.benmendil@ultrahaptics.com passwordeval "pass ultrahaptics/okta.com/samir.benmendil@ultrahaptics.com" #set default account -account default : gmail +account default : mailfence diff --git a/mutt/accounts/mailfence b/mutt/accounts/mailfence new file mode 100644 index 0000000..4714c72 --- /dev/null +++ b/mutt/accounts/mailfence @@ -0,0 +1,28 @@ +# vim: ft=muttrc +set realname = "Samir Benmendil" +set from = "me@rmz.io" +my_hdr Bcc: sent@rmz.io +set sendmail = "msmtp -a mailfence" + +set spoolfile = "+mailfence/inbox" # set inbox +set postponed = "+mailfence/drafts" # drafts folder +set record = "+mailfence/sent" # fcc sent message into folder +set trash = "+mailfence/trash" # deleted messages go here +set mbox = "+mailfence/archive" +unset move # do not move read msgs, we archive them after 3 months + +# goobook +#TODO +# set query_command = "goobook query '%s'" + +mailboxes "+mailfence/inbox" +mailboxes "+mailfence/sent" +# mailboxes "+mailfence/youtube" +mailboxes "+mailfence/archive" +mailboxes "+mailfence/drafts" +mailboxes "+mailfence/spam" +mailboxes "+mailfence/trash" + +macro index,pager gi "=mailfence/inbox" "go to inbox" +macro index,pager ga "=mailfence/archive" "go to archive" +macro index,pager gs "=mailfence/spam" "go to spam" diff --git a/mutt/bindings b/mutt/bindings index 8aac997..4898ee6 100644 --- a/mutt/bindings +++ b/mutt/bindings @@ -49,5 +49,6 @@ bind attach view-mailcap # add sender to goobook macro index,pager a "goobook add" "add the sender address to goobook" -macro index,pager 'source $my_config_dir/accounts/gmail!' +macro index,pager 'source $my_config_dir/accounts/mailfence!' macro index,pager 'source $my_config_dir/accounts/fpp!' +macro index,pager 'source $my_config_dir/accounts/gmail!' diff --git a/mutt/hooks b/mutt/hooks index 44b709e..40391e3 100644 --- a/mutt/hooks +++ b/mutt/hooks @@ -1,8 +1,9 @@ # vim: ft=muttrc -reply-hook . source $my_config_dir/accounts/gmail +reply-hook . source $my_config_dir/accounts/mailfence reply-hook "%L chakra" source $my_config_dir/accounts/chakra reply-hook "%L fpp" source $my_config_dir/accounts/fpp +folder-hook mailfence source $my_config_dir/accounts/mailfence folder-hook gmail source $my_config_dir/accounts/gmail folder-hook gmail/chakra source $my_config_dir/accounts/chakra @@ -14,6 +15,8 @@ folder-hook .* "exec collapse-all" folder-hook inbox push '=(=U|=F)' # delete mails older than 3 months folder-hook gmail/inbox push '!~(~U|~F|~d<3m)' +# or archive them for mailfence +folder-hook mailfence/inbox push '!~(~U|~F|~d<3m)=archive' # limit youtube to Unread and Flagged mails folder-hook gmail/youtube push '=(=U|=F)' diff --git a/mutt/muttrc b/mutt/muttrc index 5bfba23..3c9a2da 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -2,6 +2,7 @@ set my_config_dir = $XDG_CONFIG_HOME/mutt # general settings alternates -group me samir.benmendil@gmail.com ram-z@hotmail.com @rmz.io +alternates -group me samir.benmendil@mailfence.com alternates -group me -group chakra ram-z@chakra chakra@rmz.io alternates -group me -group unimaas s.benmendil@student.maastrichtuniversity.nl alternates -group me -group cadscan sb@cad-scan.co.uk @@ -106,4 +107,4 @@ source hooks source bindings source colors/badfox # color theme -source accounts/gmail # source default account +source accounts/mailfence # source default account