This is a docker container for running offlineimap with a Fastmail email address
$ docker run -e EMAIL=$EMAIL -e PASSWORD=$PASSWORD -v ~/mail:/home/offlineimap/mail/ offlineimap-fastmail
This assumes ~/mail exists and is writable by the user with uid 1000; any directory with correct permissions can be used.
An example systemd unit file has also been included in the repository for convenience. If using the provided file, make sure to define the EMAIL, PASSWORD, and USERNAME environment variables in /etc/sysconfig/offlineimap-fastmail. (USERNAME refers to your username on the host machine)
EMAIL=username@example.com
PASSWORD=hunter2
USERNAME=myusernameYou may also want to use the included systemd timer to schedule periodic polling.