Score:1

Postfix - add x-header to show which transport has been used

eh flag

I have postfix configured with multiple IP's using round robin transport.

How can I add an x-header to detail which of the transports was used to send the email ?

ie so on a received email i could look at the headers and see which transport was used.

many thanks!

anx avatar
fr flag
anx
So, you want to add or edit headers? The `header_checks` feature can do this. Note the `Received` header is parsed by recipients with some expectations about the structure, so if its something you only use locally anyway, be careful about which information to add where (or whether to even add an entirely separate header).
us flag
Is this what you are looking for?: https://unix.stackexchange.com/questions/44123/add-header-to-outgoing-email-with-postfix
Adam avatar
eh flag
so, i know how to add a header, but how can i pick up the transport name used and add that as a header value ? ie, if transport "smtp1"‪ is used, i add X-HEADER:Transport SMTP1 as an example
royarisse avatar
cn flag
I'm not sure how you've set up the multiple IP's, but assuming every IP has a separate entry in your `master.cf`, you could add a `-o header_checks = pcre:[...]` for every IP separately. This means you'd have to create a header_checks-file per IP.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.