Coder Social home page Coder Social logo

tedyst / docker-send-only-postfix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidepedranz/docker-send-only-postfix

1.0 1.0 0.0 18 KB

Dockerized Postfix (send-only, tls) + OpenDKIM.

License: MIT License

Shell 51.67% Dockerfile 48.33%

docker-send-only-postfix's Introduction

docker-send-only-postfix

Docker container with Postfix configured in send-only mode and OpenDKIM. Postfix will accept emails from all private IP addresses on all network interfaces. All emails send from Postfix to other email servers are encrypted using standard TLS.

Setup

In order to use this container, you will need to setup OpenDKIM.

Generate a pair of private-public key:

mkdir keys
cd keys
opendkim-genkey -s mail -d example.com

The command will generate 2 files mail.private, your private key, and mail.txt, with the DNS record you need to setup.

TXT mail._domainkey.example.com "v=DKIM1; k=rsa; p=...private key..."

Usage

Make sure the container is not directly exposed on the Internet, since it will accept emails from every network interface. The typical setup is to connect it to other Docker containers using some private network.

docker run -d \
    -p 127.0.0.1:25:25 \
    -e DOMAIN=example.com \
    -v /path/to/mail.private:/etc/opendkim/domainkeys/mail.private \
    davidepedranz/docker-send-only-postfix:v0.1.0

Optional

Setup SPF to limit who can send emails on behave of your domain. See the references. Example (limit only the IP that maps to domain example.com to send emails):

TXT example.com "v=spf1 a -all"

Setup DMARC to limit who can send emails on behave of your domain. Please setup and check SPF and DKIM before DMARC.

TXT _dmarc.example.com "v=DMARC1; p=reject; pct=100; adkim=s; aspf=s"

Check tool: https://dmarcian.com/dmarc-inspector/

References

License

See LICENSE file.

docker-send-only-postfix's People

Contributors

davidepedranz avatar ryanburnette avatar tedyst avatar

Stargazers

 avatar

Watchers

 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.