[exim] $header_X-xxx expansion not working in router section

Top Page
Delete this message
Reply to this message
Author: Andreas Pflug
Date:  
To: exim-users
Subject: [exim] $header_X-xxx expansion not working in router section
Using exim 4.72 (debian squeeze), I'm trying to implement a NDR
suppression in case the non-deliverable mail is marked as spam. Since
the receiving exim instance is in a dmz, it cannot verify the recipient
immediatly, so the bouncing happens after the mailscanner has processed
the message and the local delivery fails.

To have NDRs on non-spam mails, my idea was to set errors_to to "" only
if the message has been marked as X-Spam-Status: Yes by mailscanner,
using this in the router section:

errors_to= ${if eq { $header_X-Spam-Status: }{"Yes"} {"ap@???"} 
{$return_path}    }


Unfortunately, $header_X-Spam-Status: expands to empty. When debugging,
I found that standard headers do work (e.g. $header_Received: ) but not
non-standard headers. Same happens when I try this as condition to omit
the NDR from the outgoing router.

What am I missing?

Regards,
Andreas