Add .offlineimap.py

Add .offlineimaprc
This commit is contained in:
Chris Cowley 2025-09-22 14:15:42 +02:00
parent 45fc6ebb7e
commit 8a01af2045
2 changed files with 29 additions and 0 deletions

8
dot_offlineimap.py Normal file
View file

@ -0,0 +1,8 @@
#! /usr/bin/env python
from subprocess import check_output
def get_pass(account):
return check_output("pass mail/" + account + "/password", shell=True).splitlines()[
0
]

21
dot_offlineimaprc Normal file
View file

@ -0,0 +1,21 @@
[general]
accounts = CowleyTech
pythonfile = ~/.offlineimap.py
[Account CowleyTech]
localrepository = CowleyTechLocal
remoterepository = CowleyTechRemote
postsynchook = ~/.local/bin/notmuch-hook.sh
[Repository CowleyTechRemote]
type = IMAP
remotehost = mail.chriscowley.me.uk
remoteuser = chris
remotepasseval = get_pass("imap")
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
[Repository CowleyTechLocal]
type = Maildir
localfolders = ~/Maildir
restoreatime = no