mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
adding offline imap to the email stack
This commit is contained in:
parent
51b40f0781
commit
de99a212df
4 changed files with 66 additions and 0 deletions
39
.config/offlineimap/config
Normal file
39
.config/offlineimap/config
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Offlineimap configuration file for protonmail
|
||||
#
|
||||
# examples on linux: /home/linuxbrew/.linuxbrew/etc/offlineimap.conf.minimal
|
||||
# /home/linuxbrew/.linuxbrew/etc/offlineimap.conf
|
||||
|
||||
[general]
|
||||
accounts = protonmail
|
||||
# this just runs a line of python to env vars below: from os import environ
|
||||
pythonfile = ~/.config/offlineimap/offlineimap_account_setup.py
|
||||
metadata = ~/.cache/offlineimap
|
||||
|
||||
[Account protonmail]
|
||||
remoterepository = protonmail-remote
|
||||
localrepository = protonmail-local
|
||||
|
||||
[Repository protonmail-local]
|
||||
type = Maildir
|
||||
localfolders = ~/.local/share/offlineimap
|
||||
sync_deletes = no
|
||||
|
||||
[Repository protonmail-remote]
|
||||
type = IMAP
|
||||
# These are just environment variables, and won't work without the python file
|
||||
remotehosteval = environ["MAIL_SERVER"]
|
||||
remoteporteval = int(environ["MAIL_PORT"])
|
||||
remoteusereval = environ["MAIL_USER"]
|
||||
remotepasseval = environ["MAIL_PASS"]
|
||||
|
||||
# this part is important for protonmail
|
||||
starttls = yes
|
||||
ssl = no
|
||||
ssl_version = tls1_2
|
||||
sslcacertfile = ~/.config/protonmail/bridge/cert.pem
|
||||
# I don't know what this does
|
||||
expunge = yes
|
||||
|
||||
# --------- section for what folders and labels you pull ------------
|
||||
nametrans = lambda foldername: re.sub ('^Folders.', '', foldername)
|
||||
folderfilter = lambda foldername: foldername not in ['All Mail']
|
2
.config/offlineimap/offlineimap_account_setup.py
Normal file
2
.config/offlineimap/offlineimap_account_setup.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env python3.11
|
||||
from os import environ
|
1
.local/share/offlineimap/README
Normal file
1
.local/share/offlineimap/README
Normal file
|
@ -0,0 +1 @@
|
|||
this is just so the directory structure is created
|
24
README.md
24
README.md
|
@ -400,6 +400,30 @@ These directories/files are installed to your home directory and follow the [XDG
|
|||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><code>offlineimap</code></summary>
|
||||
|
||||
<blockquote>
|
||||
|
||||
File: [`~/.config/offlineimap/config`](.config/offlineimap/config)
|
||||
|
||||
This is to sync your email from whereever, but it's default configured for
|
||||
protonmail right now :) You will need to export the following env variables:
|
||||
|
||||
(if using protonmail bridge, these should be the credentials from there)
|
||||
|
||||
- `MAIL_SERVER` - normally 127.0.0.1 for protonmail
|
||||
- `MAIL_USER` - normally youruser@protonmail.com for protonmail
|
||||
- `MAIL_PASS` - normally generated from the protonmail bridge app
|
||||
- `MAIL_PORT` - typically 1143 for protonmail
|
||||
|
||||
Currently we import ALL folders except the "All Mail" folder, which is just
|
||||
all the mail from all the other folders (including inbox, sent, trash, etc)
|
||||
|
||||
</blockquote>
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><code>powerline</code></summary>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue