https://github.com/bitmeal/docker-postfix-outbound
postfix docker container for sending outbound mail: add signup, notification and verification mails to your app the easy way. configured for minimum rejection rate
https://github.com/bitmeal/docker-postfix-outbound
docker mailsender mailserver outbound-email postfix smtp smtp-server
Last synced: 2 months ago
JSON representation
postfix docker container for sending outbound mail: add signup, notification and verification mails to your app the easy way. configured for minimum rejection rate
- Host: GitHub
- URL: https://github.com/bitmeal/docker-postfix-outbound
- Owner: bitmeal
- Created: 2020-03-25T11:08:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-25T21:45:47.000Z (about 5 years ago)
- Last Synced: 2025-02-14T11:43:12.456Z (4 months ago)
- Topics: docker, mailsender, mailserver, outbound-email, postfix, smtp, smtp-server
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-postfix-outbound
Simple docker container to use postfix for outbound mail sending. Intended for applications that need to send verification/notification mails, but do not need a full mailserver.## config
arguments for building:
* `DOMAIN` set your domain while buildinguse following envvars when starting with `--env / -e`:
* `SMTP_PORT`: defaults to 25
* `ALLOW_SUBNET`: subnet in CIDR notation, to accept mails from. will default to the /24 subnet of the containers ip if not given
* `MAIL_DOMAIN`: defaults to domain set while building container (if set and valid)
* `MAIL_HOSTNAME`: optional, will be set to `MAIL_DOMAIN` if missing### transport maps
Mount a directory containing `transport-pcre` or `transport-hash` at `/postfix/conf/` to use the transport_map feature and control valid recipients or relaying of your server. The regular expression mapping in **`transport-pcre` takes precedence** over the `transport-hash`-map.#### pcre
Allowing sending To, CC and BCC to everybody but `user<+optional_string>@host.com`:
```
/^user(\+[^@]+)?@host\.com/ discard:
/.*/ :
```#### hash
Allowing all `@host.com`, error on `@example.com` and silently discarding all other mails:
```
host.com :
example.com error: No example.com allowed
* discard:
```## run
example commandline:
```bash
docker run -d --env SMTP_PORT=10025 --env MAIL_DOMAIN=my.domain --name postfix --network mynetwork --network-alias mailsender postfix
```## build
```bash
docker build --tag postfix .
```