On Thu, Jun 18, 2026 at 09:37:38PM -0400, postfix--- via Postfix-users wrote:
> is there a CLI tool that for a pair of [email protected] and > [email protected] predicts how Postfix will dispose of the message > (obviously ignoring the various headers/content filters etc.)? > > asking to avoid the duplication of writing a parser to extract the relevant > `postconf -n` values, feeding them into `postmap -q`, and so on. The nearest approximation is: sendmail -f "$from" -bv -- "$to" with an important caveat that the deliverability report is emailed to the envelope sender ("$from"), not the postmaster. So if you have sender-dependent routing in place, you'd need to generate a "look-alike" probe sender address that is subject to the same transport rules as the sender to test, but any mail to the probe address is in fact sent the postmaster. Perhaps shadow every special sender address in a sender-dependent default transport or relayhost table with a twin used for testing: [email protected] ... value1 ... [email protected] ... value1 ... [email protected] ... value2 ... [email protected] ... value2 ... @domain3.example ... value3 ... @domain3.example.probe.invalid ... value3 ... ... And in the virtual(5) table: virtual_alias_maps = # "$$" in main.cf, one is sufficient in a dedicated table file pcre:{{/\.probe\.invalid$$/ postmaster}}, ... other extant tables ... Command-line demo: $ postmap -q '[email protected]' 'pcre:{{/\.probe\.invalid$/ postmaster}}' postmaster -- Viktor. 🇺🇦 Слава Україні! _______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
