Update email setup to include a gmail account (FOR TESTING)

I need to see how this setup behaves with a gmail account, so I can
help people who ask me about it during my coaching sessions.
This commit is contained in:
Protesilaos Stavrou 2024-11-04 07:37:39 +02:00
parent 5831fb8b1c
commit 4503ebfedd
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
5 changed files with 47 additions and 3 deletions

View file

@ -13,14 +13,16 @@
:defer t
:config
(let ((prv (prot-common-auth-get-field "prv" :user))
(gml (prot-common-auth-get-field "gml" :user))
(pub (prot-common-auth-get-field "pub" :user))
(inf (prot-common-auth-get-field "inf" :user)))
(setq notmuch-identities
(mapcar (lambda (str)
(format "%s <%s>" user-full-name str))
(list prv pub inf))
(list prv gml pub inf))
notmuch-fcc-dirs
`((,prv . "prv/Sent")
(,gml . "\"gml/[Gmail]/Sent Mail\"")
(,inf . "inf/Sent")
(,pub . "pub/Sent")))))

View file

@ -9250,14 +9250,16 @@ the accounts I set.
:defer t
:config
(let ((prv (prot-common-auth-get-field "prv" :user))
(gml (prot-common-auth-get-field "gml" :user))
(pub (prot-common-auth-get-field "pub" :user))
(inf (prot-common-auth-get-field "inf" :user)))
(setq notmuch-identities
(mapcar (lambda (str)
(format "%s <%s>" user-full-name str))
(list prv pub inf))
(list prv gml pub inf))
notmuch-fcc-dirs
`((,prv . "prv/Sent")
(,gml . "\"gml/[Gmail]/Sent Mail\"")
(,inf . "inf/Sent")
(,pub . "pub/Sent")))))
#+end_src

View file

@ -80,3 +80,30 @@ Remove Near
Expunge Near
SyncState *
##########
IMAPAccount gml
Host imap.gmail.com
UserCmd "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/gml/ { print $(NF-2); exit; }'"
PassCmd "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/gml/ { print $NF; exit; }'"
SSLType IMAPS
IMAPStore gml-remote
Account gml
MaildirStore gml-local
Subfolders Verbatim
# The trailing "/" is important
Path ~/.mail/gml/
Inbox ~/.mail/gml/Inbox
Channel gml
Far :gml-remote:
Near :gml-local:
# Include everything
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred"
Sync All
Create Near
Remove Near
Expunge Near
SyncState *

View file

@ -30,5 +30,17 @@ eval echo from $(gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/p
eval echo user $(gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/prv/ { print $(NF-2); exit; }')
passwordeval "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/prv/ { print $NF; exit; }'"
# gml
account gml
auth on
protocol smtp
tls on
tls_starttls on
host smtp.gmail.com
port 587
eval echo from $(gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/gml/ { print $(NF-2); exit; }')
eval echo user $(gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/gml/ { print $(NF-2); exit; }')
passwordeval "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/gml/ { print $NF; exit; }'"
# Set a default account (I copied from man msmtp)
account default : pub

View file

@ -33,7 +33,8 @@ notmuch tag +inbox +unread -new -- tag:new
# tag my replies as "sent"
# notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*" not to:"*@protesilaos.com*" not tag:list)'
notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*" not to:"*@protesilaos.com*" not tag:list not tag:archived)'
notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*" not to:"*protesilaos*" not tag:list not tag:archived)'
notmuch tag -new -unread +inbox +sent -- '(from:"*prot*@gmail*" not to:"*protesilaos*" not tag:list not tag:archived)'
# This is imperfect, but add the "coach" tag to any message that
# includes those keywords in the subject line. The starting date is