diff options
-rwxr-xr-x | adopt | 5 | ||||
-rw-r--r-- | emacs/.emacs.d/main.el | 60 | ||||
-rw-r--r-- | msmtp/.msmtprc | 7 | ||||
-rw-r--r-- | offlineimap/.offlineimaprc | 31 |
4 files changed, 70 insertions, 33 deletions
diff --git a/adopt b/adopt index a0a210fa..6789a6b9 100755 --- a/adopt +++ b/adopt @@ -1,5 +1,6 @@ #!/bin/sh DOTFILES_DIR=$(dirname $(readlink -f $0)) +STOW="$DOTFILES_DIR/stow" if [ "$#" -lt 2 ] then @@ -15,7 +16,7 @@ then mkdir -p $TARGET fi mv $2/* $TARGET - ./stow $1 + $STOW $1 elif [ -f $2 ] then TARGET="$DOTFILES_DIR/$1/$(dirname $2)" @@ -24,5 +25,5 @@ then mkdir -p $TARGET fi mv $2 $TARGET - ./stow $1 + $STOW $1 fi diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index dc14373c..768e336f 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -1377,7 +1377,8 @@ mu4e-view-show-images t mu4e-headers-date-format "%Y-%m-%d %H:%M" - mu4e-maildir (expand-file-name "~/mail/alanpearce") + mu4e-mu-home (expand-file-name "~/.cache/mu/alanpearce.eu") + mu4e-maildir (expand-file-name "~/mail/personal/alanpearce/") mu4e-sent-folder "/Sent" mu4e-drafts-folder "/Drafts" mu4e-refile-folder "/Archive" @@ -1386,32 +1387,37 @@ message-send-mail-function #'message-send-mail-with-sendmail sendmail-program "msmtp" - mu4e-maildir-shortcuts '(("/INBOX" . ?i)) - ;; mu4e-get-mail-command "offlineimap -o" - mu4e-contexts - (list - (make-mu4e-context - :name "Personal" - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg :to "alan@alanpearce\..*"))) - :vars '((user-mail-address . "alan@alanpearce.eu"))) - (make-mu4e-context - :name "Work" - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg :to "alan.*@satoshipay.io"))) - :vars '((user-mail-address . "alan@satoshipay.io")))) - mu4e-user-mail-address-list (append - (delq nil - (mapcar (lambda (context) - (when (mu4e-context-vars context) - (cdr (assq 'user-mail-address (mu4e-context-vars context))))) - mu4e-contexts)) - '("alan@alanpearce.uk" - "alan@alanpearce.co.uk"))))) + mu4e-maildir-shortcuts '(("/INBOX" . ?i)) + mu4e-contexts + (list + (make-mu4e-context + :name "Personal" + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg :to "alan@alanpearce\..*"))) + :vars `((user-mail-address . "alan@alanpearce.eu") + (mu4e-maildir . ,(expand-file-name "~/mail/personal/alanpearce")) + (mu4e-mu-home . ,(expand-file-name "~/.cache/mu/alanpearce.eu")) + (mu4e-sent-messages-behavior . sent))) + (make-mu4e-context + :name "Riseup" + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg :to "alanpearce@riseup.net"))) + :vars `((user-mail-address . "alanpearce@riseup.net") + (mu4e-maildir . ,(expand-file-name "~/mail/personal/riseup")) + (mu4e-mu-home . ,(expand-file-name "~/.cache/mu/riseup.net")) + (mu4e-sent-messages-behavior . sent)))) + mu4e-user-mail-address-list (append + (delq nil + (mapcar (lambda (context) + (when (mu4e-context-vars context) + (cdr (assq 'user-mail-address (mu4e-context-vars context))))) + mu4e-contexts)) + '("alan@alanpearce.uk" + "alan@alanpearce.co.uk")))) ;; #+END_SRC ;; ** Misc diff --git a/msmtp/.msmtprc b/msmtp/.msmtprc index 9a3c1938..6216e0b2 100644 --- a/msmtp/.msmtprc +++ b/msmtp/.msmtprc @@ -22,5 +22,12 @@ account riseup host smtp.riseup.net from alanpearce@riseup.net +account riseup +host mail.riseup.net +from alanpearce@riseup.net +user alanpearce +port 465 +passwordeval pass mail/riseup.net + # Set a default account account default : personal diff --git a/offlineimap/.offlineimaprc b/offlineimap/.offlineimaprc index ea98729f..1e157934 100644 --- a/offlineimap/.offlineimaprc +++ b/offlineimap/.offlineimaprc @@ -1,6 +1,6 @@ [general] # List of accounts to be synced, separated by a comma. -accounts = alanpearce.eu +accounts = alanpearce.eu, riseup.net pythonfile = ~/.offlineimap.py [Account alanpearce.eu] @@ -10,13 +10,13 @@ localrepository = alanpearce.eu-local remoterepository = alanpearce.eu-remote autorefresh = 20 quick = 2 -postsynchook = mu index --maildir=%(personalmaildir)s --lazy-check --nocleanup --quiet +postsynchook = mu index --muhome=~/.cache/mu/alanpearce.eu --maildir=%(alanpearcemaildir)s --lazy-check --nocleanup --quiet [Repository alanpearce.eu-local] # OfflineIMAP supports Maildir, GmailMaildir, and IMAP for local repositories. type = Maildir # Where should the mail be placed? -localfolders = %(personalmaildir)s +localfolders = %(alanpearcemaildir)s [Repository alanpearce.eu-remote] # Remote repos can be IMAP or Gmail, the latter being a preconfigured IMAP. @@ -30,5 +30,28 @@ holdconnectionopen = yes usecompression = yes idlefolders = ['INBOX'] +[Account riseup.net] +localrepository = riseup.net-local +remoterepository = riseup.net-remote +autorefresh = 20 +quick = 2 +postsynchook = mu index --muhome=~/.cache/mu/riseup.net --maildir=%(riseupmaildir)s --lazy-check --nocleanup --quiet + +[Repository riseup.net-local] +type = Maildir +localfolders = %(riseupmaildir)s + +[Repository riseup.net-remote] +type = IMAP +remotehost = mail.riseup.net +remoteuser = alanpearce +remotepasseval = get_pass("mail/riseup.net") +sslcacertfile = /etc/ssl/certs/ca-certificates.crt +keepalive = 1740 +holdconnectionopen = yes +usecompression = yes +idlefolders = ['INBOX'] + [DEFAULT] -personalmaildir = ~/mail/alanpearce +alanpearcemaildir = ~/mail/personal/alanpearce +riseupmaildir = ~/mail/personal/riseup |