GithubHelp home page GithubHelp logo

centos-mailcatcher's Introduction

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://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far. Read more at mailcatcher.me

MailCatcher Preview

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 127.0.0.1:1025:1025 -p 0.0.0.0:1080:1080 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 = 127.0.0.1:1025' >> /etc/postfix/main.cf

Server Test:

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

Nginx vhost:

server {
	    listen     80;
	    server_name  mailcatcher.io;
	    location / {
	                  proxy_pass http://127.0.0.1:1080;
	                  proxy_http_version 1.1;
	                  proxy_set_header Upgrade $http_upgrade;
	                  proxy_set_header Connection "upgrade";
	      }
}

The Hosts File

You must add the "mailcatcher.io" 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:

127.0.0.1  mailcatcher.io

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:

http://mailcatcher.io

centos-mailcatcher's People

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.