forward/reply solution for internal mails
This commit is contained in:
@@ -5,20 +5,38 @@ CFG_ROOT="/tmp/docker-mailserver"
|
||||
SRC_DIR="$CFG_ROOT/postfix"
|
||||
DST_DIR="/etc/postfix"
|
||||
|
||||
# Dateien nach /etc/postfix kopieren (oder aktualisieren)
|
||||
# install -D -m 0644 "$SRC_DIR/transport" "$DST_DIR/transport"
|
||||
# install -D -m 0600 "$SRC_DIR/sasl_passwd" "$DST_DIR/sasl_passwd"
|
||||
install -D -m 0644 "$SRC_DIR/header_checks" "$DST_DIR/header_checks"
|
||||
echo "[user-patches.sh] Starting Postfix customizations..."
|
||||
|
||||
# Existing patches (header_checks, etc.)
|
||||
install -D -m 0644 "$SRC_DIR/header_checks" "$DST_DIR/header_checks"
|
||||
install -D -m 0644 "$SRC_DIR/smtp_header_checks" "$DST_DIR/maps/sender_header_filter.pcre"
|
||||
|
||||
# Maps bauen
|
||||
# postmap "$DST_DIR/transport"
|
||||
# postmap "$DST_DIR/sasl_passwd"
|
||||
# NEW: Append content filter configuration to main.cf
|
||||
if [ -f "$SRC_DIR/main.cf.append" ]; then
|
||||
echo "[user-patches.sh] Appending content filter config to main.cf..."
|
||||
cat "$SRC_DIR/main.cf.append" >> "$DST_DIR/main.cf"
|
||||
echo "[user-patches.sh] ✓ main.cf updated"
|
||||
else
|
||||
echo "[user-patches.sh] ⚠ main.cf.append not found, skipping"
|
||||
fi
|
||||
|
||||
# Rechte auf die .db-Helferdatei
|
||||
# chmod 600 "$DST_DIR/sasl_passwd.db" || true
|
||||
# NEW: Append content filter services to master.cf
|
||||
if [ -f "$SRC_DIR/master.cf.append" ]; then
|
||||
echo "[user-patches.sh] Appending content filter services to master.cf..."
|
||||
cat "$SRC_DIR/master.cf.append" >> "$DST_DIR/master.cf"
|
||||
echo "[user-patches.sh] ✓ master.cf updated"
|
||||
else
|
||||
echo "[user-patches.sh] ⚠ master.cf.append not found, skipping"
|
||||
fi
|
||||
|
||||
# rm -f /etc/dovecot/conf.d/95-sieve-redirect.conf
|
||||
# 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"
|
||||
else
|
||||
echo "[user-patches.sh] ⚠ WARNING: content_filter.py not found or not executable!"
|
||||
fi
|
||||
|
||||
echo "[user-patches.sh] Postfix customizations complete"
|
||||
|
||||
# Postfix neu laden (nachdem docker-mailserver seine eigene Konfig geladen hat)
|
||||
postfix reload || true
|
||||
Reference in New Issue
Block a user