summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2021-05-15 20:20:45 -0400
committerAmin Bandali <bandali@gnu.org>2021-05-15 20:20:45 -0400
commita220fb5b7ed9e3cf55f0a85bbb11f0f264a0020b (patch)
tree90baead5730e5aa4c5e9d6b941462c0ee820aebb
parentbc04a4d40544c77d163d6497f3863b9b566d64d4 (diff)
downloadconfigs-a220fb5b7ed9e3cf55f0a85bbb11f0f264a0020b.tar.gz
configs-a220fb5b7ed9e3cf55f0a85bbb11f0f264a0020b.tar.xz
configs-a220fb5b7ed9e3cf55f0a85bbb11f0f264a0020b.zip
migrate from msmtp (external) to emacs's own smtpmail
todo: see if it's possible to pin cert fingerprints as with msmtp
Diffstat (limited to '')
-rw-r--r--.config/msmtp/config72
-rw-r--r--.emacs.d/init.el5
-rw-r--r--.emacs.d/lisp/bandali-gnus.el7
-rw-r--r--.emacs.d/lisp/bandali-message.el3
4 files changed, 7 insertions, 80 deletions
diff --git a/.config/msmtp/config b/.config/msmtp/config
deleted file mode 100644
index d255c46..0000000
--- a/.config/msmtp/config
+++ /dev/null
@@ -1,72 +0,0 @@
-# Set default values for all following accounts.
-defaults
-port 587
-tls on
-auth on
-#tls_trust_file /etc/ssl/certs/ca-certificates.crt
-logfile ~/.msmtp.log
-
-account shemshak
-host mail.shemshak.org
-# use `msmtp -a shemshak --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
-tls_fingerprint 16:BD:BE:20:63:B1:BD:34:C6:E9:5F:1E:98:45:7D:51:E3:3D:3F:27:FC:23:E9:BD:17:A7:A4:96:E7:70:51:BF
-tls_starttls on
-from amin@shemshak.org
-user bandali@shemshak.org
-passwordeval gpg --no-tty -q -d ~/.passwd/shemshak.gpg
-
-account bandali : shemshak
-from bandali@shemshak.org
-account aminb : shemshak
-from amin@aminb.org
-account bndl : shemshak
-from a@bndl.org
-
-account gnu
-host fencepost.gnu.org
-# use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
-tls_fingerprint 9D:87:65:25:E1:02:D3:0B:05:27:D3:6A:45:71:31:5F:08:A7:81:5B:1B:1D:CC:84:6A:F8:92:52:BE:46:12:B6
-tls_starttls on
-from bandali@gnu.org
-user bandali
-passwordeval gpg --no-tty -q -d ~/.passwd/gnu.gpg
-
-account gnu-mab : gnu
-from mab@gnu.org
-account gnu-aminb : gnu
-from aminb@gnu.org
-account gnu-amin : gnu
-from amin@gnu.org
-
-account uwaterloo
-host connect.uwaterloo.ca
-tls_starttls on
-from abandali@uwaterloo.ca
-user abandali
-passwordeval gpg --no-tty -q -d ~/.passwd/uwaterloo.gpg
-tls_trust_file /etc/ssl/certs/ca-certificates.crt
-
-account uwaterloo-friendly : uwaterloo
-from bandali@uwaterloo.ca
-
-account csclub
-host mail.csclub.uwaterloo.ca
-tls_starttls on
-from abandali@csclub.uwaterloo.ca
-user abandali
-passwordeval gpg --no-tty -q -d ~/.passwd/csclub.gpg
-tls_trust_file /etc/ssl/certs/ca-certificates.crt
-
-account csclub-friendly : csclub
-from bandali@csclub.uwaterloo.ca
-
-account sfl
-host mail.savoirfairelinux.com
-tls on
-from amin.bandali@savoirfairelinux.com
-user amin.bandali
-passwordeval gpg --no-tty -q -d ~/.passwd/sfl.gpg
-tls_trust_file /etc/ssl/certs/ca-certificates.crt
-
-# Set a default account
-account default : shemshak
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index d0ea368..29bfbcc 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -671,11 +671,6 @@ Make N (default: 1) copies of the current line or region."
;; Email (with Gnus and message)
(require 'bandali-gnus)
-(with-eval-after-load 'sendmail
- (csetq sendmail-program (executable-find "msmtp")
- ;; message-sendmail-extra-arguments '("-v" "-d")
- mail-specify-envelope-from t
- mail-envelope-from 'header))
(require 'bandali-message)
;; IRC (with ERC)
diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el
index 15f5bd5..d26e4f9 100644
--- a/.emacs.d/lisp/bandali-gnus.el
+++ b/.emacs.d/lisp/bandali-gnus.el
@@ -280,7 +280,8 @@ jami:bandali")
gnus-message-replysign t
gnus-posting-styles
'((".*"
- (address "bandali@gnu.org"))
+ (address "bandali@gnu.org")
+ ("X-Message-SMTP-Method" "smtp fencepost.gnu.org 587"))
("nnimap\\+gnu:l\\..*"
(signature nil))
((header "subject" "ThankCRM")
@@ -289,23 +290,27 @@ jami:bandali")
(eval (setq b/message-cite-say-hi nil)))
("nnimap\\+shemshak:.*"
(address "amin@shemshak.org")
+ ("X-Message-SMTP-Method" "smtp mail.shemshak.org 587")
(body "\nBest,\n")
(signature b/shemshak-signature)
(gcc "nnimap+shemshak:Sent")
(eval (setq b/message-cite-say-hi t)))
("nnimap\\+uwaterloo:.*"
(address "bandali@uwaterloo.ca")
+ ("X-Message-SMTP-Method" "smtp connect.uwaterloo.ca 587")
(body "\nBest,\n")
(signature b/uwaterloo-signature))
("nnimap\\+uwaterloo:INBOX"
(gcc "\"nnimap+uwaterloo:Sent Items\""))
("nnimap\\+csc:.*"
(address "bandali@csclub.uwaterloo.ca")
+ ("X-Message-SMTP-Method" "smtp mail.csclub.uwaterloo.ca 587")
(signature b/csc-signature)
(gcc "nnimap+csc:Sent"))
("nnimap\\+sfl:.*"
(address "amin.bandali@savoirfairelinux.com")
(signature b/sfl-signature)
+ ("X-Message-SMTP-Method" "smtp mail.savoirfairelinux.com 587")
(gcc "nnimap+sfl:Sent")
(eval (setq-local b/sfl-p t))))))
;; hooks
diff --git a/.emacs.d/lisp/bandali-message.el b/.emacs.d/lisp/bandali-message.el
index c66a669..e7a0fa4 100644
--- a/.emacs.d/lisp/bandali-message.el
+++ b/.emacs.d/lisp/bandali-message.el
@@ -55,8 +55,7 @@
message-citation-line-format "%N writes:\n"
message-citation-line-function 'message-insert-formatted-citation-line
message-kill-buffer-on-exit t
- message-send-mail-function 'message-send-mail-with-sendmail
- message-sendmail-envelope-from 'header
+ message-send-mail-function #'smtpmail-send-it
message-subscribed-address-functions
'(gnus-find-subscribed-addresses)
message-dont-reply-to-names