0

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 info@example.com.

I tried /From:info@example.com/ PREPEND X-Mailgun-Tag: Newsletters but it does not work. Which reg expression should I use?

1 Answers1

1

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

AlexD
  • 8,179
  • 2
  • 28
  • 38