All Projects → juanluisbaptiste → Docker Postfix

juanluisbaptiste / Docker Postfix

Licence: gpl-3.0
Simple SMTP relay docker image.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Postfix

webadmin
SophiMail Webadmin and Dashboard
Stars: ✭ 48 (-70.37%)
Mutual labels:  postfix, smtp-server
Docker Postfix
Simple SMTP server / postfix null relay host for your Docker and Kubernetes containers. Based on Alpine Linux.
Stars: ✭ 163 (+0.62%)
Mutual labels:  postfix, smtp-server
postfix-relay
Postfix SMTP relay docker image
Stars: ✭ 76 (-53.09%)
Mutual labels:  postfix, smtp-server
ControlCenter
Mirrored from GitLab! Monitoring and automation for Open Source email servers, starting with Postfix. Please do not submit issues or PRs here - join us at: https://gitlab.com/lightmeter
Stars: ✭ 88 (-45.68%)
Mutual labels:  postfix, smtp-server
Postfixadmin
PostfixAdmin - web based virtual user administration interface for Postfix mail servers
Stars: ✭ 509 (+214.2%)
Mutual labels:  postfix, smtp-server
Postfwd Anti Geoip Spam Plugin
Postfwd plugin for blocking international spam botnets based on geographical location of IP addresses used to login to postfix via sasl.
Stars: ✭ 40 (-75.31%)
Mutual labels:  postfix
Docker Mailman
Dockerfiles for the mailman suite.
Stars: ✭ 130 (-19.75%)
Mutual labels:  postfix
Sendria
Sendria (formerly MailTrap) is a SMTP server designed to run in your dev/test environment, that is designed to catch any email you or your application is sending, and display it in a web interface instead of sending to real world.
Stars: ✭ 30 (-81.48%)
Mutual labels:  smtp-server
Mailslurper
Local, web-based mail server application. Slurp mails into oblivion!
Stars: ✭ 920 (+467.9%)
Mutual labels:  smtp-server
Modoboa Installer
An installer for Modoboa
Stars: ✭ 161 (-0.62%)
Mutual labels:  postfix
Maildroid
Maildroid is a small robust android library for sending emails using SMTP server
Stars: ✭ 150 (-7.41%)
Mutual labels:  smtp-server
Ansible Postfix
Ansible role to set up postfix in Debian-like systems
Stars: ✭ 102 (-37.04%)
Mutual labels:  postfix
Vpstoolbox
一键安装Trojan-GFW代理,Hexo博客,Nextcloud等應用程式。
Stars: ✭ 1,080 (+566.67%)
Mutual labels:  postfix
Docker Mailserver
Docker Mailserver based on the famous ISPMail guide
Stars: ✭ 129 (-20.37%)
Mutual labels:  postfix
Mum
A web-based user management tool for Postfix and Dovecot that is easy to use and still very powerful.
Stars: ✭ 31 (-80.86%)
Mutual labels:  postfix
Papercut Smtp
Papercut SMTP -- The Simple Desktop Email Server
Stars: ✭ 2,094 (+1192.59%)
Mutual labels:  smtp-server
Docker Mailserver
Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container.
Stars: ✭ 8,115 (+4909.26%)
Mutual labels:  postfix
Netdumbster
netDumbster is a .Net Fake SMTP Server clone of the popular Dumbster
Stars: ✭ 88 (-45.68%)
Mutual labels:  smtp-server
Modoboa
Mail hosting made simple
Stars: ✭ 1,998 (+1133.33%)
Mutual labels:  postfix
Mailserver
⚠️ UNMAINTAINED - Simple and full-featured mail server using Docker
Stars: ✭ 1,267 (+682.1%)
Mutual labels:  postfix

docker-postfix

Docker Build Status Docker Stars Docker Pulls

Simple Postfix SMTP TLS relay docker alpine based image with no local authentication enabled (to be run in a secure LAN).

It also includes rsyslog to enable logging to stdout.

If you want to follow the development of this project check out my blog.

Available image tags

Currently we only handle a rolling release of new versions so only latest tag is available, but there is work in progress to start releasing versioned images to be able to pin to specific versions in production deployments.

NOTES:

  • The alpine tag has been switched to use the master branch, but it's irrelevant as it is the same as latest.
  • Old CentOS 7 based image is avaiable on the centos_base_image branch, but it is not being developed any more.

Build instructions

Clone this repo and then:

cd docker-Postfix
sudo docker build -t juanluisbaptiste/postfix .

Or you can use the provided docker-compose files:

sudo docker-compose build

For more information on using multiple compose files see here. You can also find a prebuilt docker image from Docker Hub, which can be pulled with this command:

sudo docker pull juanluisbaptiste/postfix:latest

How to run it

The following env variables need to be passed to the container:

  • SMTP_SERVER Server address of the SMTP server to use.
  • SMTP_PORT (Optional, Default value: 587) Port address of the SMTP server to use.
  • SMTP_USERNAME Username to authenticate with.
  • SMTP_PASSWORD Password of the SMTP user. If SMTP_PASSWORD_FILE is set, not needed.
  • SERVER_HOSTNAME Server hostname for the Postfix container. Emails will appear to come from the hostname's domain.

The following env variable(s) are optional.

  • SMTP_HEADER_TAG This will add a header for tracking messages upstream. Helpful for spam filters. Will appear as "RelayTag: ${SMTP_HEADER_TAG}" in the email headers.

  • SMTP_NETWORKS Setting this will allow you to add additional, comma seperated, subnets to use the relay. Used like -e SMTP_NETWORKS='xxx.xxx.xxx.xxx/xx,xxx.xxx.xxx.xxx/xx'

  • SMTP_PASSWORD_FILE Setting this to a mounted file containing the password, to avoid passwords in env variables. Used like -e SMTP_PASSWORD_FILE=/secrets/smtp_password -v $(pwd)/secrets/:/secrets/

  • ALWAYS_ADD_MISSING_HEADERS This is related to the always_add_missing_headers Postfix option (default: no). If set to yes, Postfix will always add missing headers among From:, To:, Date: or Message-ID:.

  • OVERWRITE_FROM This will rewrite the from address overwriting it with the specified address for all email being relayed. Example settings: OVERWRITE_FROM=[email protected] OVERWRITE_FROM="Your Name" [email protected]

To use this container from anywhere, the 25 port or the one specified by SMTP_PORT needs to be exposed to the docker host server:

docker run -d --name postfix -p "25:25"  \
       -e SMTP_SERVER=smtp.bar.com \
       -e [email protected] \
       -e SMTP_PASSWORD=XXXXXXXX \
       -e SERVER_HOSTNAME=helpdesk.mycompany.com \
       juanluisbaptiste/postfix

If you are going to use this container from other docker containers then it's better to just publish the port:

docker run -d --name postfix -P \
       -e SMTP_SERVER=smtp.bar.com \
       -e [email protected] \
       -e SMTP_PASSWORD=XXXXXXXX \
       -e SERVER_HOSTNAME=helpdesk.mycompany.com \           
       juanluisbaptiste/postfix

Or if you can start the service using the provided docker-compose file for production use:

sudo docker-compose up -d

To see the email logs in real time:

docker logs -f postfix

A note about using gmail as a relay

Gmail by default does not allow email clients that don't use OAUTH 2 for authentication (like Thunderbird or Outlook). First you need to enable access to "Less secure apps" on your google settings.

Also take into account that email From: header will contain the email address of the account being used to authenticate against the Gmail SMTP server(SMTP_USERNAME), the one on the email will be ignored by Gmail unless you add it as an alias.

Debugging

If you need troubleshooting the container you can set the environment variable DEBUG=yes for a more verbose output.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].