Difference between revisions of "PyThunderbird"
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
== $HOME/.thunderbird.yaml == | == $HOME/.thunderbird.yaml == | ||
The yaml file has two entries per user | The yaml file has two entries per user | ||
+ | === MacOS Example === | ||
<source lang='yaml'> | <source lang='yaml'> | ||
joe: | joe: | ||
Line 26: | Line 27: | ||
db: /Users/kathy/Library/Thunderbird/Profiles/war97k3r.default/gloda.sqlite | db: /Users/kathy/Library/Thunderbird/Profiles/war97k3r.default/gloda.sqlite | ||
profile: /Users/kathy/Library/Thunderbird/Profiles/war97k3r.default | profile: /Users/kathy/Library/Thunderbird/Profiles/war97k3r.default | ||
+ | </source> | ||
+ | === Linux example === | ||
+ | in this example the server runs from an rsync'ed backup of the thunderbird files of the different users | ||
+ | <source> | ||
+ | user123: | ||
+ | db: /hd/diskAlpha/backup/siteAlpha.com/user123/Library/Thunderbird/Profiles/randomID1.default/global-messages-db.sqlite | ||
+ | profile: /hd/diskAlpha/backup/siteAlpha.com/user123/Library/Thunderbird/Profiles/randomID1.default | ||
+ | user456: | ||
+ | db: /hd/diskBeta/backup/siteBeta.com/user456/Library/Thunderbird/Profiles/randomID2.default/global-messages-db.sqlite | ||
+ | profile: /hd/diskBeta/backup/siteBeta.com/user456/Library/Thunderbird/Profiles/randomID2.default | ||
</source> | </source> | ||
Revision as of 07:55, 23 November 2023
OsProject
OsProject | |
---|---|
edit | |
id | pyThunderbird |
state | active |
owner | WolfgangFahl |
title | pyThunderbird |
url | https://github.com/WolfgangFahl/pyThunderbird |
version | 0.0.10 |
description | |
date | 2021-10-15 |
since | 2020-10-24 |
until |
Motivation
Thunderbird uses mailbox format and an sqlite database for keeping track of the mails. How can this setup be accessed with Python?
Installation
pip install pyThunderbird
# alternatively if your pip is not a python3 pip
pip3 install pyThunderbird
# local install from source directory of pyThunderbird
pip install .
upgrade
pip install pyThunderbird -U
# alternatively if your pip is not a python3 pip
pip3 install pyThunderbird -U
Configuration
$HOME/.thunderbird.yaml
The yaml file has two entries per user
MacOS Example
joe:
db: /Users/joe/Library/Thunderbird/Profiles/klm97bfn.default/gloda.sqlite
profile: /Users/wf/Library/Thunderbird/Profiles/klm97bfn.default
kathy:
db: /Users/kathy/Library/Thunderbird/Profiles/war97k3r.default/gloda.sqlite
profile: /Users/kathy/Library/Thunderbird/Profiles/war97k3r.default
Linux example
in this example the server runs from an rsync'ed backup of the thunderbird files of the different users
user123:
db: /hd/diskAlpha/backup/siteAlpha.com/user123/Library/Thunderbird/Profiles/randomID1.default/global-messages-db.sqlite
profile: /hd/diskAlpha/backup/siteAlpha.com/user123/Library/Thunderbird/Profiles/randomID1.default
user456:
db: /hd/diskBeta/backup/siteBeta.com/user456/Library/Thunderbird/Profiles/randomID2.default/global-messages-db.sqlite
profile: /hd/diskBeta/backup/siteBeta.com/user456/Library/Thunderbird/Profiles/randomID2.default
Relevant Libraries
Links
- https://stackoverflow.com/questions/21625906/access-thunderbird-emails-by-python
- https://stackoverflow.com/questions/60938536/decoding-mail-subject-thunderbird-in-python-3-x
- https://medium.com/shanes-tech-tips/offlineimap-to-thunderbird-152bb02286f
- https://groups.google.com/g/comp.lang.python/c/sp-3_ddmgbA?pli=1
- https://wlsoft.de/?q=node/369
- https://github.com/rooper/thunderbirdscraper/blob/master/run.py
- https://stackoverflow.com/questions/26567843/reading-the-mail-content-of-an-mbox-file-using-python-mailbox/26567942