Skip to content

deviceflow/docker-imap-devel

 
 

Repository files navigation

Dockerized IMAP server#

IMAP server for debugging.

IMPORTANT: This image is ONLY for developing/debugging proposes

This docker image is based on https://github.com/tomav/docker-mailserver If you look for a docker image for production environment, then go here: https://hub.docker.com/r/tvial/docker-mailserver/

This image is even simpler than tvial docker image. Includes only Postfix (SMTP) and Dovecot (IMAP) servers with one catchall mailbox [email protected] for all emails. So, it's very useful for debugging. Optionally, you can define another normal mailbox.

Every email received via SMTP will be delivered locally to [email protected], so it's safe for testing a web application sending emails with a production list of emails.

Using your favorite email client you can connect via IMAP protocol to see emails like original recipient would received them

Building

Normally the dev-services code in the monorepo will handle running it, and the image is stored in ECR. If you do have to build it yourself, set the AWS_ACCOUNT_ID environment variable and run just build-docker && just push-docker.

Run container with docker compose

cp docker-compose.yml.dist docker-compose.yml

Edit docker-compose.yml for set these environment variables:

  • MAILNAME: Mail domain (by default, localdomain.test)
  • MAIL_CATCH_ALL: Optionally, set this to an email address that will receive all emails that don't go to any existing mailbox.
docker-compose up

You can set the list of email accounts to create by binding to the file /mailboxes.txt. This should be a new-line separated list of email addresses.

All accounts from this file, as well as the catch all, will have the password "test".

Configure your email client with these parameters and test it sending any email to any email address

Catch all debug mailbox

  • IMAP server: imap

  • IMAP encryption: SSL

  • IMAP port: 993

  • IMAP username: [email protected] (change example.org by your MAILNAME)

  • IMAP password: debug

  • SMTP server: imap

  • SMTP encryption: No

  • SMTP port: 25

  • SMTP authentication: none

Normal user mailbox (Optional)

  • IMAP server: imap

  • IMAP encryption: SSL

  • IMAP port: 993

  • IMAP username: [email protected] (change [email protected] by your MAIL_ADDRESS)

  • IMAP password: pass (change pass by your MAIL_PASS)

  • SMTP server: imap

  • SMTP encryption: No

  • SMTP port: 25

  • SMTP authentication: none

About

Dockerized SMTP/IMAP server for development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 66.4%
  • Dockerfile 18.9%
  • BitBake 7.6%
  • Just 7.1%