diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-06 17:50:04 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-06 17:50:04 +0100 |
| commit | 439c8b273b6203af49242baf18eb7c22b3c4a035 (patch) | |
| tree | 7962cb398c649f4f5fd156ec89449fe041e9fdfd /config | |
| parent | ce2a2cf9f5b7eb035e326930dcdab5e3018b1d0c (diff) | |
| download | dotfiles-439c8b273b6203af49242baf18eb7c22b3c4a035.tar.gz dotfiles-439c8b273b6203af49242baf18eb7c22b3c4a035.zip | |
simplify offlineimap setup
use xdg_spec instead of silly variable expansion patch
Diffstat (limited to 'config')
| -rw-r--r-- | config/offlineimap/config | 49 | ||||
| -rw-r--r-- | config/offlineimap/offlineimap.py | 4 | ||||
| -rw-r--r-- | config/offlineimap/offlineimap@.service | 14 |
3 files changed, 67 insertions, 0 deletions
diff --git a/config/offlineimap/config b/config/offlineimap/config new file mode 100644 index 0000000..c54570f --- /dev/null +++ b/config/offlineimap/config @@ -0,0 +1,49 @@ +# offlineimap config file + +[general] +accounts = FAUMail,MUHQ +maxsyncaccounts = 2 +pythonfile = ~/.config/offlineimap/offlineimap.py + +[Account FAUMail] +localrepository = LocalFAU +remoterepository = FAU + +autorefresh=1 +quick=10 + +[Repository FAU] +type = IMAP +remotehost = faumail.uni-erlangen.de +remoteport = 993 +remoteuser = aj46ezos +remotepasseval = get_passwd("FAU") +ssl=yes +cert_fingerprint = BB9EE687E92693794C752F57C53483076DEF2755 +newmail_hook = lambda: __import__("os").system("i3-nagbar -m \"new mail in FAU\" > /dev/null 2>&1 &") + +[Repository LocalFAU] +type = Maildir +localfolders = ~/.local/share/maildir/FAU/ + + +[Account MUHQ] +localrepository=LocalMUHQ +remoterepository=MUHQ + +autorefresh=1 +quick=10 + +[Repository MUHQ] +type = IMAP +remotehost = antares.uberspace.de +remoteport = 993 +remoteuser = muhq +remotepasseval = get_passwd("MUHQ") +ssl=yes +cert_fingerprint = B53A1586456E35E454DA3581980330903753AD3E +newmail_hook = lambda: __import__("os").system("i3-nagbar -m \"new mail in MUHQ\" > /dev/null 2>&1 &") + +[Repository LocalMUHQ] +type = Maildir +localfolders = ~/.local/share/maildir/MUHQ/ diff --git a/config/offlineimap/offlineimap.py b/config/offlineimap/offlineimap.py new file mode 100644 index 0000000..8172d4d --- /dev/null +++ b/config/offlineimap/offlineimap.py @@ -0,0 +1,4 @@ +from subprocess import check_output + +def get_passwd(account): + return check_output("pass email/" + account, shell=True).rstrip().split("\n")[0] diff --git a/config/offlineimap/offlineimap@.service b/config/offlineimap/offlineimap@.service new file mode 100644 index 0000000..67c7e2b --- /dev/null +++ b/config/offlineimap/offlineimap@.service @@ -0,0 +1,14 @@ +[Unit] +Description=Start offlineimap as a daemon +Requires=network-online.target +After=network.target + +[Service] +User=%i +EnvironmentFile=/etc/systemd/system/offlineimap@fischerling.env +ExecStart=/usr/bin/offlineimap +KillSignal=SIGUSR2 +# Restart=always + +[Install] +WantedBy=multi-user.target |
