[exim-dev] [Bug 1521] New: list separator missing for multip…

Top Pagina
Delete this message
Reply to this message
Auteur: Heiko Schlittermann
Datum:  
Aan: exim-dev
Onderwerp: [exim-dev] [Bug 1521] New: list separator missing for multiple values returned from ldap (fix included)
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1521
           Summary: list separator missing for multiple values returned from
                    ldap (fix included)
           Product: Exim
           Version: 4.84
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: work:tiny
          Severity: bug
          Priority: medium
         Component: Lookups
        AssignedTo: nigel@???
        ReportedBy: hs+exim@???
                CC: exim-dev@???



Hi,

given the following LDAP entry

    x-MailPrimaryAddress: a@???
    x-MailAlternateAddress: b@???
    x-MailAlternateAddress: c@???


where the x-Mail* attributes have SUP mail,
exim -be '${lookup ldap{ldap:///<base>?mail?sub?<filter>}}' returns

    a@???@example.com,c@???


The comma first comma separatur is missing.

In ldap.c the data returned by ldap are appended to a string. The relevant
piece of code expects one attribute returned from ldap, but then gets multiple
attributes with multiple values. (Multiple attributes are returned because all
these attributes are derived from 'mail', thus x-MailPrimaryAddress *IS*
'mail', as x-MailAlternateAddress *IS* 'mail').

The attached patch works for me, and hopefulle does not break other
configurations. After appliying the patch the above query returns

    a@???,b@???,c@???


as one would expect.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email