dotfiles/mail/.config/isync/mbsyncrc
Marty Oehme c5cd2b6a8d
mail: Enable direct pgp decryption
When called over systemd, pass will not display a pin-entry field to
decrypt the necessary passwords for email synching.

This prepares automatic background synching.
2020-09-24 14:22:03 +02:00

37 lines
1.4 KiB
Text

# documentation: https://wiki.archlinux.org/index.php/isync
IMAPAccount gmail
# Address to connect to
Host imap.gmail.com
UserCmd "gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | grep username | cut -d: -f2"
PassCmd "gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | head -n1"
# To store the password in an encrypted file use PassCmd instead of Pass
# PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"
#
# Use SSL
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
# Throttle simultaneous access to make google happy
PipelineDepth 60
IMAPStore gmail-remote
Account gmail
MaildirStore mail-local
Subfolders Verbatim
# The trailing "/" is important
Path ~/documents/mail/
Inbox ~/documents/mail/Inbox
# define generous maximum size to store locally
MaxSize 50M
Channel gmail
Far :gmail-remote:
Near :mail-local:
# Exclude everything under the internal [Gmail] folder, except the interesting folders
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" "[Gmail]/Trash"
#Patterns *
# Automatically create missing mailboxes, both locally and on the server
Create Both
# Save the synchronization state files in the relevant directory
SyncState *