Peter Uetrecht via Postfix-users: > Hello everyone, > > I need an easy way to add a custom header that depends on the domain part > of the envelope rcpt to. If the receiving domain matches the custom header > should be added. I know about header_checks, but that can?t be used because > the receiver is not included in the header to.
Use a PREPEND action in a Postfix access table. If it is for one user: /etc/postfix/main.cf: ... check_recipient_access inline:{ {u...@example.com PREPEND X-Foo: Bar}} ... If it is for multiple users: /etc/postfix/main.cf: ... check_recipient_access hash:/etc/postfix/recipient-prepend ... /etc/postfix/recipient-prepend: al...@example.com PREPEND X-Foo: something for alice b...@example.com PREPEND X-Foo: something for bob If the prepended text has a copy of the recipient: /etc/postfix/main.cf: ... check_recipient_access pcre:/etc/postfix/recipient-prepend/pcre ... /etc/postfix/recipient-prepend/pcre: /(.+)/ PREPEND X-Foo: something for $1 Postfix is primarily a table-driven system. The approach has limitations but it is also very expressive. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org