On Sun, 7 Oct 2018 at 21:37, Janos Dohanics <w...@3dresearch.com> wrote:

> I have been trying to edit the Subject: line using header_checks,
> without success:
>
> header_checks.pcre:
>
> if /^From: (.*)<(.+)mydomain\.com\>$/i
> /^Subject: (.*)$/i
>     REPLACE Subject: some_string $1
> endif
>
> main.cf:
>
> header_checks = pcre:/usr/local/etc/postfix/header_checks.pcre
>

I don't know how this can be done by postfix. See
http://www.postfix.org/header_checks.5.html - header lines are inspected
one at a time and you can only take action on the one header line that is
being inspected. To do what you want - rewrite subject depending on 'To:' I
think you need a suitable milter. I'm sure someone more experienced than me
can suggest one.

Reply via email to