Giter VIP home page Giter VIP logo

docker-mutt's Introduction

docker-mutt

Run your favorite mail client mutt in a Docker container without installing mutt on your host system.

Configuration

The fstab/mutt docker image contains only the mutt and msmtp applications, but no configuration. The configuration must be created in a directory on the host system and mounted as a volume to /home/mutt in the container.

On the host system, create a folder ~/.mutt/. In this folder, create the configuration files as follows:

msmtp configuration

msmtp is a sendmail replacement that can be used for sending mail via an SMTP server. It is configured on the host system in a file ~/.mutt/.msmtprc as follows:

defaults
logfile ~/.msmtp.log

account alice
host mail.example.com
from [email protected]
auth on
user alice
password xxxxxxxx

account default : alice

mutt configuration

mutt is configured on the host system in ~/.mutt/.muttrc.

#########################
# sending with msmtp
#########################

set sendmail="/usr/bin/msmtp"
set use_from=yes
set realname="Alice Springs"
set [email protected]
set envelope_from=yes

#########################
# receiving with imap
#########################

set folder="imaps://alice:[email protected]"
set spoolfile="+INBOX"
set record="+Sent"
set postponed="+Drafts"
set trash="+Trash"
set header_cache = "/home/mutt/.mutt_cache"
set message_cachedir = "/home/mutt/.mutt_cache"

# Automatically poll subscribed mailboxes for new mail (new in 1.5.11)
set imap_check_subscribed
# Reduce polling frequency to a sane level
set mail_check=60

#########################
# usability
#########################

set editor="vim"

Create the mutt cache directory ~/.mutt/.mutt_cache/ on the host system and change access rights of ~/.mutt/ to 700.

Run from Docker Hub

A pre-built image is available on Docker Hub. Once the configuration is created on the host system, the container can be run as follows:

docker run -v ~/.mutt:/home/mutt -t -i fstab/mutt

The container will start up with the mutt mail client.

Build from Source

  1. Make sure Docker is installed.

  2. Clone fstab/docker-mutt from GitHub.

    git clone https://github.com/fstab/docker-mutt.git
  3. Build the docker image

    cd docker-mutt
    docker build -t="fstab/mutt" .
  4. Once the configuration is is created on the host system, the docker container can be run as follows:

    docker run -v ~/.mutt:/home/mutt -t -i fstab/mutt

Create an alias

If everything works fine, add an alias to the ~/.bashrc so that the container can be run with a simple mutt command:

alias mutt="docker run -v ~/.mutt:/home/mutt -t -i fstab/mutt"

docker-mutt's People

Contributors

fstab 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.