Code Monkey home page Code Monkey logo

docker-offlineimap's Introduction

cryptopath/offlineimap

Version Layers Pulls Stars Build Status

OfflineIMAP is a GPLv2 software to dispose your mailbox(es) as a local Maildir(s). For example, this allows reading the mails while offline without the need for your mail reader (MUA) to support disconnected operations. OfflineIMAP will synchronize both sides via IMAP. OfflineIMAP

Usage

docker create --name=offlineimap \
  -v <path to data volume>:/vol \
  -e CONFIG_PATH=<config - optional, default: /vol/config> \
  -e SECRETS_PATH=<secrets - optional, default: /vol/secrets> \
  -e MAIL_PATH=<mail - optional, default: /vol/mail> \
  -e CRON_SCHEDULE=<sync cron-job schedule - optional, default: "0 3 * * *"> \
  -e PUID=<uid - optional, default: 911> \
  -e PGID=<gid - optional, default: 911> \
  -e PGIDS=<additional gids - optional> \
  -e TZ=<timezone - optional> \
  cryptopath/offlineimap

Parameters

The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. For example with -p external:internal - this shows the port mapping from internal (container) to external (host) ports. So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.

  • -v /vol - the base directory of the data volume
  • -e CONFIG_PATH (default: /vol/config) - where offlineimap should store config files
  • -e SECRETS_PATH (default: /vol/secrets) - folder for storing secrets (passwords, certificates)
  • -e MAIL_PATH (default: /vol/mail) - local mail folder base path
  • -e CRON_SCHEDULE (default: "0 3 * * *") - the string supplied to cron for running the sync job
  • -e PUID for UserID - see below for explanation
  • -e PGID for GroupID - see below for explanation
  • -e PGIDS for additional GroupIDs - see below for explanation
  • -e TZ for timezone information, eg. Europe/London

It is based on alpine linux with s6 overlay, for shell access whilst the container is running do docker exec -it offlineimap /bin/bash.

User / Group Identifiers

Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID, as well as additional groups PGIDS. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" โ„ข.

In this instance PUID=1001 and PGID=1001. To find yours use id user as below:

  $ id <dockeruser>
    uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)

You can also optionally specify additional group identifiers like this: PGIDS="2001 2003 2004". These group-ids will then be added to the user.

Example offlineimaprc

[general]
metadata = /vol/config/metadata
accounts = [email protected]
maxsyncaccounts = 3
ui = basic
socktimeout = 120

[mbnames]
enabled = yes
filename = /vol/config/email/mailboxes
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"

[Account [email protected]]
localrepository = [email protected]
remoterepository = [email protected]
autorefresh = 2
quick=10

[Repository [email protected]]
type = Maildir
localfolders = /vol/mail/[email protected]

[Repository [email protected]]
type = IMAP
remotehost = mail.example.org
remoteuser = [email protected]
remotepassfile = /vol/secrets/[email protected]
sslcacertfile: %(systemcacertfile)s
ssl = yes
readonly = True
remoteport = 993

[DEFAULT]
systemcacertfile = /etc/ssl/certs/ca-certificates.crt

Make sure the container is stopped before editing these settings.

Info

  • To monitor the logs of the container in realtime docker logs -f offlineimap.

  • container version number

docker inspect -f '{{ index .Config.Labels "org.opencontainers.image.version" }}' offlineimap

  • image version number

docker inspect -f '{{ index .Config.Labels org.opencontainers.image.version" }}' cryptopath/offlineimap

Author and license

(c) 2018 Ismail "CeRiAl" Khatib <[email protected]>.

This software is licensed under the MIT terms, you can find a copy of the license on the LICENSE file in this repository.

Versions

  • 2018-11-03: Version 0.1.0
  • 2018-10-07: Version 0.0.2
  • 2018-10-06: Initial Release.

docker-offlineimap's People

Contributors

cerial avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.