On Sat, Jan 17, 2026 at 01:22:35PM +0100, John Fawcett via Postfix-users wrote:
> in the section "Simple content filtering". If so that would require you to > make a configuration update in master.cf for the smtp service adding the > parameter " > > -ocontent_filter > <https://www.postfix.org/postconf.5.html#content_filter>=rewritepipe:dummy > > and reload postfix. Actually, given that non-trivial processing applies only for a specific sender, the simpler design is: smtpd_sender_restrictions = check_sender_access inline:{ { [email protected] = FILTER rewritepipe:dummy } } which can go into main.cf, with no master.cf tweaks. The "rewritepipe" might then be simplified to elide the sender address check. Mind you, it can all be just a combination of a additional smtp(8), smtpd(8) and cleanup(8) services obviating the need for any fragile scripts: main.cf: smtpd_sender_restrictions = check_sender_access inline:{ { [email protected] = reroute_rcpt_check } } smtpd_restriction_classes = reroute_rcpt_check reroute_target = [email protected] reroute_transport = reroute:[127.0.0.1]:10025 reroute_filter = FILTER $reroute_transport reroute_virtual = inline:{ { [email protected] = $reroute_target} { [email protected] = $reroute_target } } reroute_rcpt_check = check_recipient_access inline:{ { [email protected] = $reroute_filter } { [email protected] = $reroute_filter } } master.cf: 10025:127.0.0.1 inet n - n - - smtpd -o { smtpd_tls_security_level = none } # No restrictions beyond allowing loopback clients -o { mynetworks = 127.0.0.1 } -o { smtpd_client_restrictions = } -o { smtpd_helo_restrictions = } -o { smtpd_sender_restrictions = } -o { smtpd_recipient_restrictions = } -o { smtpd_relay_restrictions = permit_mynetworks, reject } -o { smtpd_data_restrictions = } # Dedicated cleanup for custom virtual rewrites -o { cleanup_service_name = reroute_cleanup } rcleanup unix n - n - 0 cleanup -o { enable_original_recipient = no } # Just virtual rewrites, nothing else -o { virtual_alias_maps = $reroute_virtual } -o { masquerade_domains = } -o { canonical_maps = } -o { sender_canonical_maps = } -o { recipient_canonical_maps = } -o { remote_header_rewrite_domain = } -o { header_checks = } -o { mime_header_checks = } -o { nested_header_checks = } -o { body_checks = } reroute unix - - n - - smtp -o { smtp_tls_security_level = none } # No rewrites during delivery -o { smtp_generic_maps = } -o { smtp_header_checks = } -- Viktor. 🇺🇦 Слава Україні! _______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
