Debian Codegraph @

contrib/store-pw-with-gpg/README.md

raw
1 # gpg-offlineimap
2
3 Python bindings for offlineimap to use gpg instead of storing cleartext passwords
4
5 Author: Lorenzo G.
6 [GitHub](https://github.com/lorenzog/gpg-offlineimap)
7
8 ## Quickstart
9
10 Requirements: a working GPG set-up. Ideally with gpg-agent. Should work
11 out of the box on most modern Linux desktop environments.
12
13 1. Enable IMAP in gmail (if you have two factor authentication, you
14 need to create an app-specific password)
15
16 2. Create a directory `~/Mail`
17
18 3. In `~/Mail`, create a password file `passwords-gmail.txt`. Format:
19 `[email protected] password`. Look at the example file in this
20 directory.
21
22 4. **ENCRYPT** the file: `gpg -e passwords-gmail.txt`. It should create
23 a file `passwords-gmail.txt.gpg`. Check you can decrypt it: `gpg -d
24 passwords-gmail.txt.gpg`: it will ask you for your GPG password and
25 show it to you.
26
27 5. Use the file `offlineimaprc.sample` as a sample for your own
28 `.offlineimaprc`; edit it by following the comments. Minimal items
29 to configure: the `remoteuser` field and the `pythonfile` parameter
30 pointing at the `offlineimap.py` file in this directory.
31
32 6. Run it: `offlineimap`. It should ask you for your GPG passphrase to
33 decrypt the password file.
34
35 7. If all works well, delete the cleartext password file.
36
37