[Exim] Adding headers and querying them in ACLs

Página Inicial
Delete this message
Reply to this message
Autor: Marc Langer
Data:  
Para: exim-users
Assunto: [Exim] Adding headers and querying them in ACLs
Hello,

I tried to add a header in one ACL and to query it in another ACL.
Is that possible? The following config doesn't work :-(

# Add header on certain recipients:
acl_check_rcpt:
  [...]
  warn    recipients = +dont_check
          message = X-Accepted-Recipient: $local_part@$domain
  accept  recipients = +dont_check


# Only require header_syntax verify if the header is *not* present:
acl_check_message:
accept condition = ${if def:header_x-accepted-recipient: {yes} {no}}
require verify = header_syntax
accept

>>> using ACL "acl_check_message"
>>> processing "accept"
>>> check condition = ${if def:header_x-accepted-recipient: {yes} {no}}
>>>                 = no
>>> accept: condition test failed
>>> processing "require"
>>> check verify = header_syntax
>>> require: condition test failed

550 Administrative prohibition
LOG: 16r51g-0003fG-00 H=(marclanger.de) [62.72.65.62] F=<marc@???> rejected after DATA: "@" or "." expected after "undisclosed": failing address in "To" header is:
<undisclosed recipients>

When syntax check succedes, the mail contains the custom header:

X-Accepted-Recipient: postmaster@???


Why doesn't my condition work? Is the header added after going through
the ACL?

Thanks,
Marc