Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 1.15 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.15 KB

Postfix forwarding

Mail forwarding from custom domain to, for example, gmail.

Image is based on alpine:3.5 linux and the resulting size is around 60 MB.

Generating docker image

To generate docker image execute from root directory:

docker build -t local/mail .

After that a new image should be available in your local docker repository as local/mail.

Running a docker image

You need to provide few variables when creating a container:

  • HOSTNAME - server's hostname - preferably FQDN one, example: awesome-server.somedomain.com
  • DOMAINS - virtual alias domains that you want to forward mails for, example: example.com somedomain.com
  • EMAILS - rules for forwarding, example (you can use [email protected] if you want to forward just one specific email instead of using a catch all rule): @example.com [email protected]\[email protected] [email protected]\n

Whole command could like this:

docker run -d -p 25:25 -e HOSTNAME=awesome-server.somedomain.com -e "DOMAINS=example.com somedomain.com" -e "[email protected] [email protected]\[email protected] [email protected]\n" --name mail local/mail