浏览代码

Add postscreen whitelist syntax and examples (#3931)

ValdikSS 4 年之前
父节点
当前提交
9c559680a6
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      data/Dockerfiles/postfix/postfix.sh

+ 7 - 1
data/Dockerfiles/postfix/postfix.sh

@@ -358,7 +358,13 @@ fi
 
 if [[ ! -f /opt/postfix/conf/custom_postscreen_whitelist.cidr ]]; then
   echo "Creating dummy custom_postscreen_whitelist.cidr"
-  echo '# Autogenerated by mailcow' > /opt/postfix/conf/custom_postscreen_whitelist.cidr
+  cat <<EOF > /opt/postfix/conf/custom_postscreen_whitelist.cidr
+# Autogenerated by mailcow
+# Rules are evaluated in the order as specified.
+# Blacklist 192.168.* except 192.168.0.1.
+# 192.168.0.1          permit
+# 192.168.0.0/16       reject
+EOF
 fi
 
 # Fix SMTP last login on slaves