On 23 May 2012, at 7:59, Loïc Latreille wrote:

Hello,

I would check if a string is present in the message body only if the
"To" field is equal to "j...@example.org".

Read the man page for header_checks. Note the first bullet point in the "BUGS" section.

Alternatively, read $readme_directory/BUILTIN_FILTER_README, particularly the section on limitations.


I tried to use IF...ENDIF but it doesn't work because the pattern
between IF and ENDIF doesn't match the same input string that the IF
pattern.

A part of the body :
...
To: JDOE <j...@example.org>
From: "t...@otherexample.org" <t...@otherexample.org>
X-Email-Type-Id: TT123MM
...

My pcre table for the body_checks :
IF /To: JDOE <jdoe@example\.org>/
/X-Email-Type-Id: TT123MM/ REDIRECT m...@example.org
ENDIF

I need some help to run my filter, I can not seem to find a solution
to this problem :(


The solutions you could use do not include the built-in body_checks and header_checks features of Postfix, but rather to use one of the available interfaces to external filters.

Reply via email to