From d8894404164db7b81d702fe47a1581a99c7f503d Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Wed, 9 Dec 2020 12:59:23 -0500 Subject: ditch msmtp in favour of local opensmtpd --- .caffrc | 2 +- .gitignore | 1 - .msmtprc | 103 ------------------------------------------------------ .mutt/accounts.rc | 16 ++++----- .muttrc | 2 +- .nailrc | 9 ++--- .vm | 15 +++----- Makefile | 21 +++-------- SUBSTS | 3 -- 9 files changed, 22 insertions(+), 150 deletions(-) delete mode 100644 .msmtprc diff --git a/.caffrc b/.caffrc index a0a3199..ad1b491 100644 --- a/.caffrc +++ b/.caffrc @@ -17,7 +17,7 @@ $CONFIG{'keyid'} = [ qw{8F7BF8FC4A11C97A} ]; $CONFIG{'also-encrypt-to'} = [ qw{8F7BF8FC4A11C97A} ]; $CONFIG{'caffhome'} = $ENV{'HOME'}.'/.caff'; -$ENV{'PERL_MAILERS'} = 'sendmail:'.$ENV{'HOME'}.'/bin/msmtp/msmtp-default'; +$ENV{'PERL_MAILERS'} = [ 'sendmail', '-oem', '-oi' ]; $CONFIG{'mailer-send'} = [ 'sendmail' ]; # The options below need not be changed for normal operation. diff --git a/.gitignore b/.gitignore index 922cfa9..7f05e55 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,4 @@ emacsen/make-* .irssi/certs/* .irssi/away.log .irssi/config.autosave -bin/msmtp .config/wpa_supplicant.conf diff --git a/.msmtprc b/.msmtprc deleted file mode 100644 index 67b801c..0000000 --- a/.msmtprc +++ /dev/null @@ -1,103 +0,0 @@ -defaults -logfile ~/.msmtp.log -domain LOCALHOST - -account default -from rak@debian.org -host smtp.gmail.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth on -user ryanakca@gmail.com -password GMAIL_PASS - -account queensu -from ryan.kavanagh@queensu.ca -host smtp.office365.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -tls_certcheck on -auth on -user 9rak@queensu.ca -password QUEENSU_PASS - -account ubuntu -from ryanakca@ubuntu.com -host smtp.gmail.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth on -user ryanakca@gmail.com -password GMAIL_PASS - -account kubuntu -from ryanakca@kubuntu.org -host smtp.gmail.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth on -user ryanakca@gmail.com -password GMAIL_PASS - -account queensucs -from ryan@cs.queensu.ca -host smtp.gmail.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth on -user ryanakca@gmail.com -password GMAIL_PASS - -account ryanakca -from rak@ryanak.ca -host smtp.ryanak.ca -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth login -user rak -password RYANAKCA_PASS - -account rakac -from rak@rak.ac -host smtp.ryanak.ca -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth login -user rak -password RYANAKCA_PASS - -account cmuscs -from rkavanagh@cs.cmu.edu -host smtp.gmail.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth on -user rkavanag@andrew.cmu.edu -password CMU_PASS - -account cmu -from rkavanag@andrew.cmu.edu -host smtp.gmail.com -port 587 -tls on -tls_starttls on -tls_trust_file SSL_CERTS -auth on -user rkavanag@andrew.cmu.edu -password CMU_PASS diff --git a/.mutt/accounts.rc b/.mutt/accounts.rc index f7db56b..48c87d6 100644 --- a/.mutt/accounts.rc +++ b/.mutt/accounts.rc @@ -8,7 +8,7 @@ set folder = 'imaps://ryanakca@gmail.com@imap.gmail.com';\ set postponed = '=[Google Mail]/Drafts';\ set spoolfile = '=INBOX';\ set from = 'Ryan Kavanagh ';\ -set sendmail='MSMTP_PATH';\ +set sendmail = 'sendmail -oem -oi';\ set record = '=[Google Mail]/Sent Mail';\ set copy = 'no';\ unset smtp_url;\ @@ -39,7 +39,7 @@ set imap_passive = 'no';\ set mbox = '=Read';\ unset smtp_url;\ unset smtp_pass;\ -set sendmail = 'MSMTP_PATH -a queensu';\ +set sendmail = 'sendmail -oem -oi';\ set from = 'Ryan Kavanagh ';\ set pager_format = '-%Z-QUEENSU: %C/%m: %-20.20n %s';\ set compose_format = '-- QUEENSU: Compose [Approx. msg size: %l Atts: %a]%>-';\ @@ -69,7 +69,7 @@ set imap_passive = 'no';\ set imap_keepalive = 60;\ set folder = 'imaps://rkavanag@andrew.cmu.edu@imap.gmail.com';\ set spoolfile = '=INBOX';\ -set sendmail='MSMTP_PATH -a cmuscs';\ +set sendmail='sendmail -oem -oi';\ set from = 'Ryan Kavanagh ';\ set mbox = '=Read';\ set record = '=[Gmail]/Sent Mail';\ @@ -97,25 +97,25 @@ macro index "cimaps://outlook.office365.com/" macro compose 'set folder="imaps://ryanakca@gmail.com@imap.gmail.com"\ \ -set sendmail="MSMTP_PATH -a ubuntu"\ +set sendmail="sendmail -oem -oi"\ Ryan Kavanagh ' \ "Send mail from Ubuntu account" macro compose 'set folder="imaps://ryanakca@gmail.com@imap.gmail.com"\ \ -set sendmail="MSMTP_PATH -a kubuntu"\ +set sendmail="sendmail -oem -oi"\ Ryan Kavanagh ' \ "Send mail from Kubuntu account" macro compose 'set folder="imaps://rkavanag@andrew.cmu.edu@imap.gmail.com"\ \ -set sendmail="MSMTP_PATH -a cmu"\ +set sendmail="sendmail -oem -oi"\ Ryan Kavanagh ' \ "Send mail from CMU account" macro compose 'set folder="imaps://rkavanag@andrew.cmu.edu@imap.gmail.com"\ \ -set sendmail="MSMTP_PATH -a cmuscs"\ +set sendmail="sendmail -oem -oi"\ Ryan Kavanagh ' \ "Send mail from CMU SCS account" @@ -126,7 +126,7 @@ macro compose 'set folder="imaps://outlook.office365.com" 'set folder="imaps://ryanakca@gmail.com@imap.gmail.com"\ \ -set sendmail="MSMTP_PATH -a queensucs"\ +set sendmail="sendmail -oem -oi"\ Ryan Kavanagh ' \ "Send mail from cs.queensu.ca" diff --git a/.muttrc b/.muttrc index 9fee5bd..09c1d26 100644 --- a/.muttrc +++ b/.muttrc @@ -123,7 +123,7 @@ unignore X-Label: set mbox_type=mbox # In case it's unset -set sendmail=MSMTP_PATH +set sendmail="sendmail -oem -oi" # For the -f option to work properly with account-hooks, it looks like I need # to unset the folder option diff --git a/.nailrc b/.nailrc index 9d6126d..9a91fcf 100644 --- a/.nailrc +++ b/.nailrc @@ -1,5 +1,5 @@ define clearset { - unset folder from sendmail record smtp password + unset folder from record smtp password unset smime-sign smime-sign-cert smime-sign-nickname unset hold } @@ -12,7 +12,6 @@ account l { account d { call clearset set folder=imap://ryan@localhost/ - set sendmail=HOMEDIR/bin/msmtp/msmtp-default set from="Ryan Kavanagh " } @@ -21,7 +20,6 @@ account g { 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 sendmail=HOMEDIR/bin/msmtp/msmtp-default set imap-keepalive=30 set hold unset MBOX @@ -34,7 +32,6 @@ account q { 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 sendmail=HOMEDIR/bin/msmtp/msmtp-queensu set MBOX=@Read set record=@"Sent Items" @@ -46,7 +43,6 @@ account r { set folder=imaps://rak@imap.rak.ac/ set imap-starttls-rak@imap.rak.ac set password-rak@imap.rak.ac=RYANAKCA_PASS - set sendmail=/usr/sbin/sendmail set MBOX=@Read set record=@Sent @@ -57,7 +53,6 @@ account c { 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 sendmail=HOMEDIR/bin/msmtp/msmtp-cmu set MBOX=@Read } @@ -93,6 +88,8 @@ set MBOX=~/mbox set quote="headers" +set sendmail=sendmail + shortcut mitm imaps://rakavan@imap.exchange.mit.edu:993/ shortcut lh imap://ryan@localhost/ diff --git a/.vm b/.vm index bacd735..809a63d 100644 --- a/.vm +++ b/.vm @@ -68,29 +68,24 @@ (setq vmpc-actions '( ("From Queens" (vmpc-composition-buffer - (setq user-mail-address "ryan.kavanagh@queensu.ca") - (setq sendmail-program "~/bin/msmtp/msmtp-queensu") ) + (setq user-mail-address "ryan.kavanagh@queensu.ca") ) (vmpc-substitute-header "From" "Ryan Kavanagh ") (vmpc-substitute-header "IMAP-FCC" "local:QueensU.Sent Items") ) ("From Queens CS" (vmpc-composition-buffer - (setq user-mail-address "ryan@cs.queensu.ca") - (setq sendmail-program "~/bin/msmtp/msmtp-queensucs") ) + (setq user-mail-address "ryan@cs.queensu.ca") ) (vmpc-substitute-header "From" "Ryan Kavanagh ") ) ("From Debian" (vmpc-composition-buffer - (setq user-mail-address "rak@debian.org") - (setq sendmail-program "~/bin/msmtp/msmtp-default") ) + (setq user-mail-address "rak@debian.org") ) (vmpc-substitute-header "From" "Ryan Kavanagh ") ) ("From Ubuntu" (vmpc-composition-buffer - (setq user-mail-address "ryanakca@ubuntu.com") - (setq sendmail-program "~/bin/msmtp/msmtp-ubuntu") ) + (setq user-mail-address "ryanakca@ubuntu.com") ) (vmpc-substitute-header "From" "Ryan Kavanagh FNAME ; print "$(call get-val,MSMTP_PATH) -a " $$2 " \"$$@\"" >> FNAME }' $< - chmod 755 build/bin/msmtp/* - $(LOCALS): .FORCE build/%: % $(SUBSTS_FILE) @[ -d $(dir $@) ] || mkdir -p $(dir $@) @@ -171,7 +158,7 @@ build/%: % $(SUBSTS_FILE) install: build -diff -u ~/.mutt/alias.rc build/.mutt/alias.rc rsync -a build/ ~ - chmod 600 ~/.msmtprc ~/.netrc ~/.ssh/id_* + chmod 600 ~/.netrc ~/.ssh/id_* chmod 700 ~/.ssh -[ "$(BUILD_FONTS)" != "True" ] || fc-cache ~/.fonts diff --git a/SUBSTS b/SUBSTS index 106fc87..4d09ef7 100644 --- a/SUBSTS +++ b/SUBSTS @@ -26,9 +26,6 @@ SCREENLAYOUT zeta-home # Locale LOCALE en_CA.UTF-8 -# path to msmtp -MSMTP_PATH /usr/bin/msmtp - # colour of hostname in zsh prompt ZSH_HOST_COLOUR Green -- cgit v1.2.3