[exim] Empty variable expansion in header

Top Page
Delete this message
Reply to this message
Author: Leonhardt,Christian
Date:  
To: exim-users@exim.org
Subject: [exim] Empty variable expansion in header
Hello list,

I am using this condition for flagging all MS office documents during acl_smtp_mime. Later on I use the redirect driver to move them into a special mailbox based on acl_m_block1.

---
  accept
        condition               = ${if match \
                                        {${lc:$mime_filename}} \
                                        {\N(?i)\.(leotest|doc|docm|docx|dot|dotx|pot|potm|potx|ppam|pps|ppsm|ppsx|ppt|pptm|pptx|xla|xlam|xll|xlm|xls|xlsm|xlsx|xlt|xltm|xltx|accdb|accde|accdr|accdt|mdb|pub|sldm|sldx|vsd|vsdm|vsdx|vss|vssm|vst|vstm|vstx|wbk|wks)$\N} \
                                        {1}{0}}
        set acl_m_block1        = $mime_filename
        add_header              = X-Test-Suspicious: $acl_m_block1
        logwrite                = LEO: We found an extension ($acl_m_block1) that we dont trust. Setting acl_m_block1 for later processing
---


In the logs the variable acl_m_block1 is expanded as expected.

---
2021-04-01 22:15:27 1lS3ix-0008Rl-IC LEO: We found an extension (test.ppt) that we dont trust. Setting acl_m_block1 for later processing
2021-04-01 22:15:27 1lS3ix-0008Rl-IC LEO: We found an extension (test.leotest) that we dont trust. Setting acl_m_block1 for later processing
2021-04-01 22:15:27 1lS3ix-0008Rl-IC LEO: We found an extension (test.xls) that we dont trust. Setting acl_m_block1 for later processing
---

But in the MUA mailbox one occurrence is always missing in the header.

---
X-Test-Suspicious:
X-Test-Suspicious: test.ppt
X-Test-Suspicious: test.leotest
---

Sending just one suspicious attachment always results in an empty "X-Test-Suspicious:"
What am I doing wrong here?

---
exim -bV
   Exim version 4.92 #3 built 18-Mar-2021 08:10:15
uname -a
    4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
---


Thank you in advance and greetings
Leo