[exim-dev] [Bug 159] Wildcarding in headers_remove

Top Page
Delete this message
Reply to this message
Author: admin
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 159] Wildcarding in headers_remove
https://bugs.exim.org/show_bug.cgi?id=159

Martin von Wittich <martin.von.wittich@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.von.wittich@???


--- Comment #3 from Martin von Wittich <martin.von.wittich@???> ---
I was also just looking for this. I want to route mail to the Zammad helpdesk
which supports X-Zammad-* headers:
https://admin-docs.zammad.org/en/latest/channel-email/fetchmail.html#supported-e-mail-headers-for-presorting

I want to add an X-Zammad-Ticket-Group header in my Exim router to certain
mails so that Zammad will put them automatically into the respective group. By
default though, Zammad will delete all X-Zammad-* headers of incoming mail for
security reasons because it doesn't trust the senders. It should be possible to
disable this, but then I need to make sure that untrusted senders cannot use
X-Zammad-* headers for nefarious purposes, so I need to delete all foreign
X-Zammad-* headers in Exim, which isn't currently possible. For the time being,
I've just hardcoded the known headers:

  zammad_group_map:
    driver = redirect
    local_parts = lsearch;/etc/exim4/zammad.map
    domains = +local_domains
    # https://admin-docs.zammad.org/en/latest/channel-email/fetchmail.html
    headers_remove = X-Zammad-Ticket-Priority : X-Zammad-Ticket-Group :
X-Zammad-Ticket-Owner : X-Zammad-Ticket-State : X-Zammad-Customer-Email :
X-Zammad-Customer-Login : X-Zammad-Article-Sender : X-Zammad-Article-Type :
X-Zammad-Article-Visibility : X-Zammad-Ignore
    headers_add = X-Zammad-Ticket-Group:
${rfc2047:${lookup{$local_part}lsearch{/etc/exim4/zammad.map}}}
    data = zammad


The risk here would be that Zammad contains further undocumented headers, or
later on adds new ones, and those wouldn't be filtered by my hardcoded list. So
a way to remove all headers matching a certain wildcard/regex would be really
useful here.

--
You are receiving this mail because:
You are the QA Contact for the bug.