From 260486b305a2472002d4d9fc413728f67f221b1a Mon Sep 17 00:00:00 2001 From: 17Halbe Date: Fri, 9 Feb 2018 22:16:48 +0100 Subject: [PATCH] Updated Configure SPF (markdown) --- docs/content/config/best-practices/spf.md | 26 ++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/content/config/best-practices/spf.md b/docs/content/config/best-practices/spf.md index 88643ffc..dd99f8e4 100644 --- a/docs/content/config/best-practices/spf.md +++ b/docs/content/config/best-practices/spf.md @@ -10,4 +10,28 @@ To add a SPF record in your DNS, insert the following line in your DNS zone: ; Add SPF record domain.com. IN TXT "v=spf1 mx ~all" -Increment DNS serial and reload configuration. \ No newline at end of file +Increment DNS serial and reload configuration. + +## Backup MX, Secondary MX + +For whitelisting a IP-Address from the SPF test, you can create a config file(See [policyd-spf.conf](http://www.linuxcertif.com/man/5/policyd-spf.conf/)) and mount that file into `/etc/postfix-policyd-spf-python/policyd-spf.conf` + +**Example:** + +Create and edit a policyd-spf.conf file here `//config/postfix-policyd-spf.conf`: +```shell +debugLevel = 1 +#0(only errors)-4(complete data received) + +skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1 + +# Preferably use IP-Addresses for whitelist lookups: +Whitelist = 192.168.0.0/31,192.168.1.0/30 +# Domain_Whitelist = mx1.mybackupmx.com,mx2.mybackupmx.com + +``` +Then add this line to `docker-compose.yml` below the `volumes:` section + +```yaml +- ./config/postfix-policyd-spf.conf:/etc/postfix-policyd-spf-python/policyd-spf.conf +``` \ No newline at end of file