The only workaround here that worked for me is replacing "$h_to:" with a
"$message_headers" and then check if they contain my recipient, because the message has
been getting delivered to "undisclosed-recipients;"
Still, there seems to be a bug with the filters not recognizing the faq-mentioned $recipients.
Patryk
On 03/17/2011 12:34 PM, Patryk wrote:
> Hello,
>
> I've been trying to catch messages from a certain user to another user by a system filter
> and deliver those to someone else.
>
> My condition is:
>
> if "$h_from:" contains sender@??? and
> "$h_to:" matches name.surname@???
> then
> deliver someonelse@???
> finish
> endif
>
> However the recipient field remains empty:
> Match expanded arguments:
> Subject =
> Pattern = ^.*name\.surname@domain\.com
> Sub-condition is false: $h_to: matches ^.*name\\.surname@domain2\\.com
>
> I've checked the exim FAQ for filters and it mentions the variable $recipients could be
> used here, because at filter time the recipient field might not be available, however I get:
>
> Filter error: failed to expand "$recipients" in filter file: unknown variable name
> "recipients"
>
> The message gets delivered to the original recipient, so there's nothing wrong with it. If
> you require the header please let me know and I will email it, as I'd prefer to avoid
> posting it here.
>
> --
> Regards
>
> Patryk
>