Score:0

Postfix header_checks add X-Mailgun-Tag

cn flag

I am trying to add in the postfix header_checks, using PREPEND, some X-Mailgun-Tag headers.

When using the following expressions in the header_checks, it applies without issues to all domain emails.

/^From:.*@example.com.*/i PREPEND X-Mailgun-Tag: Newsletters

But I'd like to restrict it only to a specific email address, something like [email protected].

I tried /From:[email protected]/ PREPEND X-Mailgun-Tag: Newsletters but it does not work. Which reg expression should I use?

Nikos Klavdianos avatar
cn flag
Anyone? I also tried From:[email protected] but still does not work.
anx avatar
fr flag
anx
When asking about regular expression, always show an example of a string (here: header) that is failing to match as intended.
Score:1
jp flag

There could be any number of white space characters between From: and [email protected] but your regular expression doesn't allow that. Use something like [[:space:]]+ or \s+ (depending on which regexp format you are using).

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.