summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-07-24 00:29:24 +0000
committerJonas Smedegaard <dr@jones.dk>2007-07-24 00:29:24 +0000
commit3264d79afa32f5ce17245266c61595a5af4baeaf (patch)
treed1ea0739341318f6d551d21909aa0308c6750195 /postfix
parent997e2c05ef9ba4b3b949b3b0b1f665a33521344b (diff)
Only verify senders of own domains, to avoid clashing with recipient verification on Redpill peers.
Diffstat (limited to 'postfix')
-rwxr-xr-xpostfix/postfix.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh
index 98eac28..411c8a8 100755
--- a/postfix/postfix.sh
+++ b/postfix/postfix.sh
@@ -3,7 +3,7 @@
# /etc/local-COMMON/postfix/postfix.sh
# Copyright 2002-2007 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: postfix.sh,v 1.52 2007-07-19 00:25:16 jonas Exp $
+# $Id: postfix.sh,v 1.53 2007-07-24 00:29:24 jonas Exp $
#
# Auto-tweak plain installed postfix Debian package
#
@@ -49,6 +49,15 @@ else
fi
sasldir="$confdir/sasl"
+catfilefromownrealm() {
+ file="$1"
+ [ -d "$realmsdir" ] || exit 0
+
+ thisrealm="$(cat /etc/local-ORG/realm || dnsdomainname | tr '[a-z]' '[A-Z]')"
+
+ cat "$realmsdir/$thisrealm/$file"
+}
+
catallfilesfromotherrealms() {
file="$1"
[ -d "$realmsdir" ] || exit 0
@@ -127,10 +136,11 @@ $postconf -e "`getlinesfromfile smtpd_sender_restrictions reject_rhsbl_sender`"
$postconf -e "`getlinesfromfile smtpd_recipient_restrictions reject_maps_rbl=reject_rbl_client=maps_rbl_domains`"
$postconf -e "`getlinesfromfile smtpd_data_restrictions`"
-# Verify senders of known and suspect domains
+# Verify senders of own and suspect domains
+# (avoid verifying senders of peer domains to not clash with their recipient verification)
# FIXME: somehow do this step only if enabled in smtpd_sender_restrictions
cat /etc/local-COMMON/postfix/maildomains | sort | sed 's/$/ reject_unverified_sender/' > "$confdir/sender_access"
-catallfilesfromotherrealms maildomains | sort | sed 's/$/ reject_unverified_sender/' >> "$confdir/sender_access"
+catfilefromownrealm maildomains | sort | sed 's/$/ reject_unverified_sender/' >> "$confdir/sender_access"
postmap "$confdir/sender_access"
$postconf -e "unverified_sender_reject_code = 550"