Mathematical Institute - Help

Mutt

Install mutt

sudo apt-get install mutt

Install offlineimap

see also offlineimap in Arch wiki

sudo apt-get install offlineimap && mkdir ~/mail

gpg --full-gen-key # e.g. with name "gpg pass" pass init "gpg pass" pass insert Mail/emailaddress@uni-goettingen.de

vim ~/.offlineimaprc

#! /usr/bin/env python2
from subprocess import check_output

def get_pass(account):
    return check_output("pass Mail/" + account, shell=True).splitlines()[0]

vim ~/.offlineimaprc

[general]
# List of accounts to be synced, separated by a comma.
accounts = main
pythonfile = ~/.offlineimap.py
maxsyncaccounts = 1

[Account main]
# Identifier for the local repository; e.g. the maildir to be synced via IMAP.
localrepository = main-local
# Identifier for the remote repository; i.e. the actual IMAP, usually non-local.
remoterepository = main-remote
# Minutes between syncs
autorefresh = 0.5
# Quick-syncs do not update if the only changes were to IMAP flags.
# autorefresh=0.5 together with quick=10 yields
# 10 quick refreshes between each full refresh, with 0.5 minutes between every 
# refresh, regardless of type.
quick = 10

[Repository main-local]
# OfflineIMAP supports Maildir, GmailMaildir, and IMAP for local repositories.
type = Maildir
# Where should the mail be placed?
localfolders = ~/mail

[Repository main-remote]
# Remote repos can be IMAP or Gmail, the latter being a preconfigured IMAP.
# SSL and STARTTLS are enabled by default.
type = IMAP
remotehost = email.gwdg.de
remoteuser = gwdg\username
remoteport = 993
remotepasseval = get_pass("emailaddress@uni-goettingen.de")
# Necessary for SSL connections, if using offlineimap version > 6.5.4
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

# Instead of closing the connection once a sync is complete, offlineimap will
# send empty data to the server to hold the connection open. A value of 60
# attempts to hold the connection for a minute between syncs (both quick and
# autorefresh).This setting has no effect if autorefresh and holdconnectionopen
# are not both set.
keepalive = 60
# OfflineIMAP normally closes IMAP server connections between refreshes if
# the global option autorefresh is specified.  If you wish it to keep the
# connection open, set this to true. This setting has no effect if autorefresh
# is not set.
holdconnectionopen = yes

Execute offlineimap to download all mails. May take some time. offlineimap

sudo cp /usr/share/doc/offlineimap3/examples/systemd/offlineimap.service /etc/systemd/user/

systemctl start offlineimap.service --user

systemctl enable offlineimap.service --user