Git Product home page Git Product logo

postfix-sendgrid-relay-docker's Introduction

Postfix SendGrid relay Docker

🐳Dockerized postfix which relays emails to SendGrid. Just adding some environment variables, you can setup the container.

Note: This image is made for send-only mail server.

Features

  • 📩 Realy emails to SendGrid
  • 🔐 SMTP AUTH (with automated account creation)
  • 📇 Sender Canonical
  • ✅ SMTP AUTH with LDAP

How to use

Just pull the image and run the container with environment variables.

You need to provide the hostname of the container to give the postfix hostname, otherwise it uses the container ID as a hostname.

For example,

docker run -d --hostname example.com -e SENDGRID_API_KEY=YOUR_API_KEY -e SMTP_USER=user -e SMTP_PASSWORD=abcdef -p 25:25 -p 587:587 ghcr.io/seieric/postfix-sendgrid-relay-docker:latest

Environment variables

SENDGRID_API_KEY (Required)

Your SENDGRID's API key. The container wouldn't start if not set.

Environment variables for SMTP AUTH

If none of the following variables are set, you can use only port 25.

Basic (single account)

Just create a single account with SMTP_USER and SMTP_PASSWORD.

SMTP_USER (Required)

User for SMTP AUTH. If not set, you cannot use submission port 587. Must be used with SMTP_PASSWORD.

SMTP_PASSWORD (Required)

Password for SMTP AUTH. If not set, you cannot use submission port 587. Must be used with SMTP_USER.

LDAP authentication

Use LDAP authentication for SMTP AUTH. You need to set the following variables.

If you configure LDAP authentication, SMTP_USER and SMTP_PASSWORD will be ignored.

LDAP_SERVER (Required)

LDAP server address. For example, ldap://127.0.0.1 or ldaps://ldap.example.com. You can set multiple servers.

LDAP_BIND_DN (Required)

LDAP bind DN.

LDAP_BIND_PW (Required)

LDAP bind password.

LDAP_SEARCH_BASE (Required)

LDAP search base. For example, ou=accounts,dc=example,dc=com.

LDAP_SEARCH_FILTER (Optional)

LDAP search filter. Default is (&(objectClass=inetOrgPerson)(uid=%U)).

Feature: sender canonical

This image supports sender canonical feature included in postfix.

To use this feature, just mount your sender canonical file to /etc/postfix/sender_canonical The startup script automatically detects the file and enable the feature.

postfix-sendgrid-relay-docker's People

Contributors

seieric avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

straiforos

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.