This commit is contained in:
2026-01-16 21:53:34 -06:00
parent deed33c0cf
commit 5122082914
6 changed files with 47 additions and 25 deletions

View File

@@ -29,6 +29,17 @@ else
echo "[user-patches.sh] ⚠ master.cf.append not found, skipping"
fi
# NEW: Create and postmap local_transport_maps for selective filtering
echo "[user-patches.sh] Creating local_transport_maps..."
install -D -m 0644 /dev/null "$DST_DIR/local_transport_maps"
cat > "$DST_DIR/local_transport_maps" << 'EOF'
# Filter only local/internal deliveries (adjust to your domains)
/^.*@example\.com$/ smtp:[localhost]:10025 # Replace with your domains, e.g. /^.*@andreasknuth\.de$/
/^.*@another-domain\.com$/ smtp:[localhost]:10025
EOF
postmap "$DST_DIR/local_transport_maps"
echo "[user-patches.sh] ✓ local_transport_maps created and mapped"
# Verify content filter script exists and is executable
if [ -x "/usr/local/bin/content_filter.py" ]; then
echo "[user-patches.sh] ✓ Content filter script found"