Public Repository

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Docker CentOS Mailcatcher

Run MailCatcher as a linux container using Docker from a CentOS 7 images.

Source Repository / Contribute / Fork this project on Github.

About MailCatcher

MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp:// instead of your default SMTP server, then check out to see the mail that's arrived so far. Read more at

Pull from Docker:

docker pull danydavila/centos-mailcatcher

visit danydavila/centos-mailcatcher on docker hub for more info

Build From Dockerfile:

docker build -t danydavila/centos-mailcatcher .

Run it:

docker run -d --name mailcatcher -p -p danydavila/centos-mailcatcher

Then send yout emails through your docker host on port 1025 (or any port you want)
You can send emails from your app and check out the web interface: http://localhost:1080/.

CentOS Setup

 echo 'relayhost =' >> /etc/postfix/

Server Test:

sudo yum -y install mailx
sudo systemctl restart postfix
echo "Email Test" | mail -s "From The Server"

Nginx vhost:

server {
        listen     80;
        location / {
                      proxy_http_version 1.1;
                      proxy_set_header Upgrade $http_upgrade;
                      proxy_set_header Connection "upgrade";

The Hosts File

You must add the "" for your Nginx sites to the hosts file on your machine. The hosts file will redirect requests for your mailcatcher sites into your machine. On Mac and Linux, this file is located at /etc/hosts. On Windows, it is located at C:\Windows\System32\drivers\etc\hosts. The lines you add to this file will look like the following:

Make sure the IP address listed is the one where the container is running. Once you have added the domain to your hosts file, you will be able to access the site via your web browser:
Docker Pull Command