[GH-ISSUE #1305] [BUG] uid domain confusion in the example mailserver #455

Closed
opened 2026-02-27 08:17:23 +03:00 by kerem · 2 comments
Owner

Originally created by @hungrymonkey on GitHub (Sep 27, 2025).
Original GitHub issue: https://github.com/lldap/lldap/issues/1305

Originally assigned to: @Copilot on GitHub.

Describe the bug

You want to send an email from user@domain1.com to user@domain2.com. The email get sent from user@domain1.com to user@domain1.com instead of user@domain2.com. The search filters are wrong

https://github.com/lldap/lldap/blob/main/example_configs/mailserver.md?plain=1#L63

To Reproduce
Steps to reproduce the behavior:

  1. Create an email that send to the same userid but different domains.
  2. Click Send
  3. The emails ends up in the sender's inbox.

Expected behavior
I expected the email to be sent from domain1 to domain2

Logs


Return-Path: <ted@soundprediction.com>
Delivered-To: ted@soundprediction.com
Received: from mail.soundprediction.com
    by mail.soundprediction.com with LMTP
    id MAiiKucV12gjBQAADj/Lkw
    (envelope-from <ted@soundprediction.com>)
    for <ted@soundprediction.com>; Fri, 26 Sep 2025 22:38:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=soundprediction.com;
    s=mail; t=1758926311;
    bh=g3zLYH4xKxcPrHOD18z9YfpQcnk/GaJedfustWU5uGs=; h=From:To:Subject;
    b=P9Y235v56G4sRLfyJWdxZE8ZPp1w5LZ8VZPEC/Wf+1QFh8I9Oob9oguoSdTC9N4Ma
    iCSU04bx3P4fYlXLEpIwSgFZ+PdKiAMQcR76K9EsZ2JfTvhV4X3FzxgVbsSiARr5Va
    Bapzq/I03XhrU/qF6XDjoEs8pAoz77oJ+dI0hn0L9iVxLnKgvDXpe7b8FkUTDntXbg
    tTFpEPaSxA8L/Kxbv4UJJS4/hhajeSgtpEBM8emdXU1aJrmdjLG+KWNy2ABEJ8dFlm
    Paxb5GiPfCni99BvQsEp+QYdgRsicddqL1rQo2bGQG6jn2HuJza9hINPlmqU0H8YWO
    Bl5CVLrl/BdKA==
MIME-Version: 1.0
Date: Fri, 26 Sep 2025 18:38:31 -0400
From: ted@soundprediction.com
To: Ted <ted@mederrata.com>
Subject: test
Message-ID: <5ea65d792139177d839110030fa04a10@soundprediction.com>
X-Sender: ted@soundprediction.com
Content-Type: text/plain; charset=US-ASCII;
    format=flowed
Content-Transfer-Encoding: 7bit

Additional context

Possible solution

      - LDAP_SERVER_HOST=ldap://lldap:3890
      - LDAP_SEARCH_BASE=ou=people,dc=example,dc=com
      - LDAP_BIND_DN=uid=admin,ou=people,dc=example,dc=com
      - LDAP_BIND_PW=<adminpass>
      - LDAP_QUERY_FILTER_USER=(&(objectClass=inetOrgPerson)(mail=%u))
      - LDAP_QUERY_FILTER_GROUP=(&(objectClass=groupOfUniqueNames)(uid=%s))
      - LDAP_QUERY_FILTER_ALIAS=(&(objectClass=inetOrgPerson)(mail=%s))
      - LDAP_QUERY_FILTER_DOMAIN=(mail=*@%s)
Originally created by @hungrymonkey on GitHub (Sep 27, 2025). Original GitHub issue: https://github.com/lldap/lldap/issues/1305 Originally assigned to: @Copilot on GitHub. **Describe the bug** You want to send an email from user@domain1.com to user@domain2.com. The email get sent from user@domain1.com to user@domain1.com instead of user@domain2.com. The search filters are wrong https://github.com/lldap/lldap/blob/main/example_configs/mailserver.md?plain=1#L63 **To Reproduce** Steps to reproduce the behavior: 1. Create an email that send to the same userid but different domains. 2. Click Send 3. The emails ends up in the sender's inbox. **Expected behavior** I expected the email to be sent from domain1 to domain2 **Logs** ``` Return-Path: <ted@soundprediction.com> Delivered-To: ted@soundprediction.com Received: from mail.soundprediction.com by mail.soundprediction.com with LMTP id MAiiKucV12gjBQAADj/Lkw (envelope-from <ted@soundprediction.com>) for <ted@soundprediction.com>; Fri, 26 Sep 2025 22:38:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=soundprediction.com; s=mail; t=1758926311; bh=g3zLYH4xKxcPrHOD18z9YfpQcnk/GaJedfustWU5uGs=; h=From:To:Subject; b=P9Y235v56G4sRLfyJWdxZE8ZPp1w5LZ8VZPEC/Wf+1QFh8I9Oob9oguoSdTC9N4Ma iCSU04bx3P4fYlXLEpIwSgFZ+PdKiAMQcR76K9EsZ2JfTvhV4X3FzxgVbsSiARr5Va Bapzq/I03XhrU/qF6XDjoEs8pAoz77oJ+dI0hn0L9iVxLnKgvDXpe7b8FkUTDntXbg tTFpEPaSxA8L/Kxbv4UJJS4/hhajeSgtpEBM8emdXU1aJrmdjLG+KWNy2ABEJ8dFlm Paxb5GiPfCni99BvQsEp+QYdgRsicddqL1rQo2bGQG6jn2HuJza9hINPlmqU0H8YWO Bl5CVLrl/BdKA== MIME-Version: 1.0 Date: Fri, 26 Sep 2025 18:38:31 -0400 From: ted@soundprediction.com To: Ted <ted@mederrata.com> Subject: test Message-ID: <5ea65d792139177d839110030fa04a10@soundprediction.com> X-Sender: ted@soundprediction.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit ``` **Additional context** Possible solution ``` - LDAP_SERVER_HOST=ldap://lldap:3890 - LDAP_SEARCH_BASE=ou=people,dc=example,dc=com - LDAP_BIND_DN=uid=admin,ou=people,dc=example,dc=com - LDAP_BIND_PW=<adminpass> - LDAP_QUERY_FILTER_USER=(&(objectClass=inetOrgPerson)(mail=%u)) - LDAP_QUERY_FILTER_GROUP=(&(objectClass=groupOfUniqueNames)(uid=%s)) - LDAP_QUERY_FILTER_ALIAS=(&(objectClass=inetOrgPerson)(mail=%s)) - LDAP_QUERY_FILTER_DOMAIN=(mail=*@%s) ```
kerem 2026-02-27 08:17:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@nitnelave commented on GitHub (Oct 4, 2025):

Can you have a look at https://github.com/lldap/lldap/pull/1312 ? Does that address your issues?

<!-- gh-comment-id:3368549919 --> @nitnelave commented on GitHub (Oct 4, 2025): Can you have a look at https://github.com/lldap/lldap/pull/1312 ? Does that address your issues?
Author
Owner

@Mindar commented on GitHub (Oct 11, 2025):

I just reproduced and tested it and can confirm that #1312 fixes this.

<!-- gh-comment-id:3393682753 --> @Mindar commented on GitHub (Oct 11, 2025): I just reproduced and tested it and can confirm that #1312 fixes this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#455
No description provided.