From 01789da3d37b6b26b9fa7a190799e60cb1eee112 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Fri, 11 Dec 2020 15:12:48 -0500 Subject: Modernize s-nail config --- .mailrc | 16 +++---- .nailrc | 112 ---------------------------------------------- .netrc | 5 ++- .s-nail.rc | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .zshrc | 1 - Makefile | 7 +-- 6 files changed, 162 insertions(+), 128 deletions(-) delete mode 100644 .nailrc create mode 100644 .s-nail.rc diff --git a/.mailrc b/.mailrc index be14e99..aa2b595 100644 --- a/.mailrc +++ b/.mailrc @@ -1,12 +1,6 @@ -set NAIL_EXTRA_RC=~/.nailrc -set sendmail=/usr/sbin/sendmail -set from="Ryan Kavanagh " -set append save emptystart - -retain Date From Sender To CC Subject - -# from /etc/mailrc -set ask askcc append dot save crt -ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To - +set ask +set crt set editheaders +ignore message-id received date fcc status resent-date resent-message-id resent-from in-reply-to + +set mailx-extra-rc=~/.s-nail.rc diff --git a/.nailrc b/.nailrc deleted file mode 100644 index 9a91fcf..0000000 --- a/.nailrc +++ /dev/null @@ -1,112 +0,0 @@ -define clearset { - unset folder from record smtp password - unset smime-sign smime-sign-cert smime-sign-nickname - unset hold -} - -account l { - call clearset - set from="rak@rak.ac (Ryan Kavanagh)" -} - -account d { - call clearset - set folder=imap://ryan@localhost/ - set from="Ryan Kavanagh " -} - -account g { - call clearset - set from="Ryan Kavanagh " - set folder=imaps://ryanakca%40gmail.com@imap.gmail.com/ - set password-ryanakca%40gmail.com@imap.gmail.com=GMAIL_mailx_PASS - set imap-keepalive=30 - set hold - unset MBOX - -} - -account q { - call clearset - set from="Ryan Kavanagh " - set folder=imaps://9rak%40queensu.ca@pod51018.outlook.com/ - set imap-starttls-9rak%40queensu.ca@pod51018.outlook.com - set password-9rak%40queensu.ca@pod51018.outlook.com=QUEENSU_PASS - - set MBOX=@Read - set record=@"Sent Items" -} - -account r { - call clearset - set from="Ryan Kavanagh " - set folder=imaps://rak@imap.rak.ac/ - set imap-starttls-rak@imap.rak.ac - set password-rak@imap.rak.ac=RYANAKCA_PASS - - set MBOX=@Read - set record=@Sent -} - -account c { - call clearset - set from="Ryan Kavanagh " - set folder=imaps://rkavanag%40andrew.cmu.edu@imap.gmail.com/ - set password-rkavanag%40andrew.cmu.edu@imap.gmail.com=CMU_PASS - - set MBOX=@Read -} - -source ~/.mailx-aliases.rc -source ~/.mailrc - -set password-rak@imap.rak.ac=RYANAKCA_PASS -set record=imaps://rak@imap.rak.ac/Sent - -# Don't display X-Brightmail-Tracker header cruft -ignore "X-Brightmail-Tracker" - -set ssl-ca-dir=/etc/ssl/certs/ - -set pipe-text/html="w3m -dump -T text/html" -set pipe-application/pgp-signature="gpg --verify" -set cmd="gpg-check | mail-highlight" -set PAGER="less -FXQR" - -set nss-config-dir="~/.mozilla/firefox/dbr0vzdh.default/" - -set imap-cache=HOMEDIR/.cache/mailx -set imap-keepalive=60 - -set autosort=thread -unset autocollapse -# Requires me to manually add the leading '-- ' -set signature=~/.signature-mailx -set bsdcompat - -set MBOX=~/mbox - -set quote="headers" - -set sendmail=sendmail - -shortcut mitm imaps://rakavan@imap.exchange.mit.edu:993/ -shortcut lh imap://ryan@localhost/ - -set keep - -set crt=50 - -# Use colours even with the pager -set colour-pager=true -# Indent the message to which I'm replying with "> " -set indentprefix="> " -# Don't strip names/comments when replying -set fullnames -# My other addresses -set alternates="ryanakca@gmail.com,rak@debian.org,rak@rak.ac,rak@ryanak.ca,rkavanag@andrew.cmu.edu,rkavanag@cs.cmu.edu,rkavanagh@cs.cmu.edu,ryan@cs.queensu.ca" -# Give header when replying -set quote - -# mailing lists -set followup-to followup-to-honour=ask-yes reply-to-honour=ask-yes diff --git a/.netrc b/.netrc index a22b55c..a1277d1 100644 --- a/.netrc +++ b/.netrc @@ -1,2 +1,5 @@ +machine imap.gmail.com login rkavanag@andrew.cmu.edu password CMU_PASS +machine imap.gmail.com login ryanakca@gmail.com password GMAIL_mailx_PASS +machine imap.rak.ac login rak password RYANAKCA_PASS machine localhost login ryan password LOCAL_PASS -machine google.com login ryanakca@gmail.com password GMAIL_PASS +machine pod51018.outlook.com login 9rak@queensu.ca password QUEENSU_PASS diff --git a/.s-nail.rc b/.s-nail.rc new file mode 100644 index 0000000..d2b7a12 --- /dev/null +++ b/.s-nail.rc @@ -0,0 +1,149 @@ +# vim: set commentstring=#%s: + +# This example assumes v15.0 compatibility mode +set v15-compat + +# Request strict TLL transport layer security checks +set tls-verify=strict + +# Do not load the default CA locations that are built into the used to TLS +# library to verify TLS server certificates. +set tls-ca-no-defaults +set tls-ca-file=SSL_CERTS + +# Send mail in utf-8, unless the original poster used a different charset +set sendcharsets=utf-8 +set reply-in-same-charset + +# When replying, do not merge From: and To: of the original message into To:. +# Instead old From: -> new To:, old To: -> merge Cc:. +set recipients-in-cc + +# Wait on the MTA for errors reported through exit status (including the +# built-in SMTP one)! +set sendwait=mta + +# Don't move read messages to MBOX +set hold + +# cache imap +set imap-cache=~/.cache/mailx + +# make sure less displays colours +set PAGER="less -FXQR" + +# always use the pager when needed +set crt + +# set colour display +set colour-pager + +# set colours +if terminal && "$features" =% +colour + colour 256 view-header fg=brown "date,from,to,cc,bcc" + colour 256 view-header fg=green "subject" + colour 256 view-msginfo fg=white,bg=blue + + colour 256 sum-dotmark ft=bold,fg=cyan dot + colour 256 sum-header fg=magenta older + colour 256 sum-thread bg=red dot + colour 256 sum-thread fg=cyan +endif + +# Default to a threaded display +set autosort=thread +# Don't automatically collapse threads +unset autocollapse + +# automatically launch visual editor when typing messages +set editalong=v + +# Only include the selected header fields when typing messages +headerpick type retain from_ date from to cc bcc subject \ + message-id mail-followup-to reply-to + +# keep names when replying to messages +set fullnames + +# Add my signature +# Requires me to manually add the leading '-- ' +define ocs_signature { + read version + echo '' + echo '-- ' + echo '~< ~/.signature' +} +set on-compose-splice=ocs_signature + +# When replying, quote message +set quote +# and prefix them with "> " +set indentprefix="> " +# and wrap lines to 72 characters +set quote-fold=72 +# with the header +set quote-inject-head="On %d, %f wrote:" + +# Be nice with mailing lists. +set followup-to followup-to-honour=ask-yes reply-to-honour=ask-yes + +# use the system sendmail for sending mail +set mta=SENDMAIL + +# and lookup passwords in netrc +set netrc-lookup + +############# +# ACCOUNTS # +############ + +set alternates="ryanakca@gmail.com,rak@debian.org,ryanakca@ubuntu.com,ryanakca@kubuntu.org,rak@rak.ac,rak@ryanak.ca,rkavanag@andrew.cmu.edu,rkavanag@cs.cmu.edu,rkavanagh@cs.cmu.edu,ryan@cs.queensu.ca" + +define gmail { + set from="Ryan Kavanagh " + set folder=imaps://ryanakca%40gmail.com@imap.gmail.com/ + unset MBOX + set record=+"[Google Mail]/Sent Items" +} + +define queensu { + set from="Ryan Kavanagh " + set folder=imaps://9rak%40queensu.ca@pod51018.outlook.com/ + set MBOX=+Read + set record=+"Sent Items" +} + +define rak { + set from="Ryan Kavanagh " + set folder=imaps://rak@imap.rak.ac/ + set MBOX=+RAK + set record=+Sent +} + +define cmu { + set from="Ryan Kavanagh " + set folder=imaps://rkavanag%40andrew.cmu.edu@imap.gmail.com/ + set MBOX=+Read + set record=+"[Gmail]/Sent Items" +} + +# rak is the default account +call rak +set inbox=+INBOX + +account g { + call gmail +} + +account q { + call queensu +} + +account r { + call rak +} + +account c { + call cmu +} + diff --git a/.zshrc b/.zshrc index 192e555..fe1bc45 100644 --- a/.zshrc +++ b/.zshrc @@ -104,7 +104,6 @@ alias vi='vim' alias sm='tmux attach -t mail || tmux -f ${HOME}/.tmux-mail.conf attach -t mail' alias remote_3051='ssh -f -N -q -L 6301:192.168.1.207:631 ryan@ryanak.ca' alias sshfw='ssh -oForwardAgent=yes' -alias mail="s-nail" alias kinits="kinit -r 200h -f rkavanag@CS.CMU.EDU && kinit -r 200h -f rkavanag@ANDREW.CMU.EDU" alias slpr="lpr -P scs_public -o Staple=1Staple\(Left\) -o KMDuplex=True" diff --git a/Makefile b/Makefile index 7a8c5b2..1a2ec1e 100755 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ LOCAL_FILES = \ .mutt/accounts.rc \ .mutt/gpg.rc \ .mutt/ssl.rc \ - .nailrc \ + .s-nail.rc \ .netrc \ .offlineimaprc \ .xinitrc \ @@ -48,6 +48,7 @@ GLOBAL_FILES = \ .local/ \ .mailcap \ .mailcheckrc \ + .mailrc \ .mutt/ \ .mutt/alias.rc \ .mutt/alias-cmu.rc \ @@ -99,8 +100,8 @@ VARS_.imapfilter/config.lua = LOCAL_PASS IMAPFILTER_GMAIL_SERVER GMAIL_PASS IMAP VARS_.mutt/accounts.rc = $(MAIL_PASS) VARS_.mutt/gpg.rc = PGPEWRAP_BINARY VARS_.mutt/ssl.rc = SSL_CERTS -VARS_.nailrc = $(MAIL_PASS) HOMEDIR GMAIL_mailx_PASS -VARS_.netrc = LOCAL_PASS GMAIL_PASS +VARS_.s-nail.rc = SENDMAIL SSL_CERTS +VARS_.netrc = $(MAIL_PASS) VARS_.offlineimaprc = $(MAIL_PASS) SSL_CERTS VARS_.xinitrc = SCREENLAYOUT PULSE VARS_.xmonad/xmonad.hs = XMONAD_DZEN_W XMONAD_DZEN_X XMONAD_DZEN_Y -- cgit v1.2.3