[exim] Handling double commas in LDAP lookup results

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Marten Lehmann
Date:  
À: Exim-users
Sujet: [exim] Handling double commas in LDAP lookup results
Hello,

we use the autoreply transport like this:

address_autoreply:
driver = autoreply
text = ${lookup ldap
{ldap:///cn=$local_part@$domain,ou=users,dc=mail?autoresponder}}
from = $local_part@$domain
subject = Re: ${rfc2047:$header_subject:} (autoresponse)
to = $sender_address
headers = MIME-Version: 1.0\nContent-Type: text/plain;
charset=UTF-8\nContent-Transfer-Encoding: 8bit
once = /var/spool/exim4/once.db
once_repeat = 1d

It worked fine for years and we didn't exactly notice, with which exam
update double commas have been added. Customers complained just recently
about seeing double commas in their autoreplies.

I found the following links on this topic:

https://www.exim.org/lurker/message/20120523.001723.4ad8bc12.en.html
https://github.com/Exim/exim/blob/master/src/src/lookups/ldap.c

The latter says "For single attributes, just double commas" and I have
no clue why it is needed. We are not using the LDAP single value result
as a list neither does our LDAP scheme allow multiple values for
"autoresponder" key.

How do we get rid of the double commas so the replies sent the senders
look like normal again?

Kind regards
Marten