Header Checks

Apply cautious header-based actions before queueing or during cleanup.

v2.4Updated 2026-07-20Production guidance
Production note: Back up configuration, run postfix check, and stage changes before reloading.

Configuration

header_checks = regexp:/etc/postfix/header_checks

# header_checks
/^X-Unwanted-Header:/ IGNORE
/^Subject: test-block/ REJECT Policy test

Test patterns

postmap -q "Subject: test-block" regexp:/etc/postfix/header_checks

Scope

Header checks are not a replacement for content filtering, authentication, or malware scanning.

Risk

Overbroad regular expressions can reject legitimate mail. Test representative headers before deployment.

Search Trushilla Documentation