Browse Source

readme: added docker instructions

Fabian Peter Hammerle 4 years ago
parent
commit
eecf4b8953
1 changed files with 9 additions and 0 deletions
  1. 9 0
      README.md

+ 9 - 0
README.md

@@ -87,5 +87,14 @@ To start the daemon directly, run the following (Remove the `-d` to run in foreg
 milterfrom -u milterfrom -g milterfrom -m 002 -d -p /var/run/milterfrom.pid -s /var/spool/postfix/milterfrom/milterfrom
 ```
 
+## Run via Docker
+
+```bash
+docker build -t milterfrom .
+docker run --restart=unless-stopped --daemon --name milterfrom milterfrom:latest
+postconf -e "smtpd_milters = tcp:milterfrom:8890$([[ $(postconf -h smtpd_milters) != "" ]] && echo -n ", " && postconf -h smtpd_milters)"
+postconf -e "non_smtpd_milters = tcp:milterfrom:8890$([[ $(postconf -h non_smtpd_milters) != "" ]] && echo -n ", " && postconf -h non_smtpd_milters)"
+```
+
 ## License
 Licensed under the 3-Clause BSD License.