Giter Club home page Giter Club logo

mailcatcher's Introduction

Build

mailcatcher

mailcatcher is a small self hosted SMTP server which catches all incoming mails and sends them to a defined mail address. Can be used with dyndns to create own addresses for trash mails. Works fine on Raspberry PI 3!

Installation with docker

  • copy docker-compose.yml
  • change variables (see bellow)
  • run with "docker-compose up -d"
  • configure port forwarding for internet port 25 in your router (for example map internet port 25 to your Raspberry PI's port 1025)

Variables:

Name Description
MC_PORT SMTP listening port. Must match mapped port of container.
MC_HOST email with this host name will be accepted (typically your dyndns host name)
MC_REDIRECT_TO destination address (all mails will be redirected to this address
MC_SENDER_MAIL This address will be used for mail sending
MC_SMTP_HOST use this SMTP server
MC_SMTP_PORT with SMTP Port
MC_SMTP_USER Authentication for SMTP server
MC_SMTP_PASSWORD Authentication for SMTP server

Hints

If you are using GMail SMTP, please activate the usage of insecure apps on https://support.google.com/accounts/answer/6010255?hl=en .

mailcatcher's People

Contributors

0xerr0r avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mailcatcher's Issues

Add Some Notes From Running?

Hi,

I was hoping to use something exactly like this, so it's great that this already exists. Thanks for writing it!

A few things I hit getting it writing which might be helpful to someone else (if they find this error or to add to the README?)

  • I was using a little cloud VPS so it's not as easy to set up port forwarding like you mention, I was just going to use port 25 straight. After a lot of errors, it turns out you can't use 25:25 in the docker-compose.yml, you have to use quoted "25:25". Strange
  • For using GMail SMTP, you also have to turn insecure apps on https://support.google.com/accounts/answer/6010255?hl=en . I thought there was a way to have a per-application password to make it more secure but didn't look more (I'll just use a throwaway account to forward). You also have to wait 30 minutes for it percolate
  • When you convert incoming To: -> From: (here), I had issues if the To: email already includes a name. So if the incoming email has To: John <[email protected]> it is converted to From: John <[email protected]> <[email protected]> and GMail doesn't always appreciate two sets of brackets. I can give a PR, I don't know Golang well so I just regexp'd removed [<>] away.
  • A GMail fact I've hit over and over and forget each time when debugging. Maybe it'll save someone else some trouble. Say [email protected] and [email protected]. If you send from [email protected] -> [email protected] it will silently stop before it sends a duplicate back to john again. Many SMTP providers including gmail use the Message-ID to prevent loops, so it'll just silently drop the email. Using mailinator/similar as MC_REDIRECT_TO is better for the initial debugging

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.