Bug 111767 - ldap mail routing in sendmail does not work
Summary: ldap mail routing in sendmail does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: sendmail
Version: 3.0
Hardware: i686
OS: Linux
high
high
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
: 118234 (view as bug list)
Depends On:
Blocks: 107563
TreeView+ depends on / blocked
 
Reported: 2003-12-09 21:25 UTC by Marc Wallman
Modified: 2007-11-30 22:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-27 09:15:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:131 0 normal SHIPPED_LIVE An updated sendmail package fixes ldap mail routing 2004-05-11 04:00:00 UTC
Red Hat Product Errata RHBA-2004:221 0 normal SHIPPED_LIVE An updated sendmail package fixes ldap mail routing and SMTP auth 2004-05-18 04:00:00 UTC

Description Marc Wallman 2003-12-09 21:25:01 UTC
Description of problem:
Sendmail segfaults when attempting to route mail using LDAP. This
problem happens every time. It does work under Red Hat 8.


Version-Release number of selected component (if applicable):
* sendmail-8.12.10-1
* OS is RHEL 3ES.
* OpenLDAP server runs 2.1.22
* Works with RH 8 and sendmail-8.12.8-9.80

How reproducible:
Can reproduce every time.


Steps to Reproduce:
1. Enable ldap mail routing in sendmail using the default
   sendmail schema / routing rules.
2. Send a test message to an address in your ldap database.
3. Run ltrace on the process accepting the incoming message
   and watch the output to see that the segfault comes after
   the ldapbind.
  
Actual results:
When submitting the message using telnet, the connection is
immediately closed after inputing the "rcpt to:" line. A ltrace (or
strace) on the process accepting the email shows the process
terminating with a segmentation fault. Non-LDAP based mail routing
works fine.


Expected results:
LDAP bind should succeed. Mail should be routed for valid users.
Notification should be given to the sending client when an invalid
"rcpt to:" line is entered.


Additional info:

Comment 1 Marc Wallman 2003-12-09 21:26:13 UTC
Here are the last few lines of an ltrace showing the sendmail process
accepting an incoming message seg faulting:

malloc(16)                                       = 0x08167868
memset(0x08167868, '\000', 16)                   = 0x08167868
strlen("ldap.nodak.edu\233389\233\23314940")     = 25
malloc(26)                                       = 0x0816d180
strcpy(0x0816d180, "ldap.nodak.edu\233389\233\23314940") = 0x0816d180
__sigsetjmp(0xbffec494, 0, 1, 389, 155)          = 0
free(0x0816d228)                                 = <void>
ldap_init(0x081207b8, 389, 0, 0, 0)              = 0x0816e560
ldap_set_option(0x0816e560, 2, 0x08122cc4, 0x080fb40c, 0x0816e560) = 0
ldap_set_option(0x0816e560, 8, 0, 0x080fb40c, 0x0816e560) = 0
ldap_set_option(0x0816e560, 3, 0x08122ccc, 0x080fb40c, 0x0816e560) = 0
ldap_set_option(0x0816e560, 4, 0x08122cc8, 0x080fb40c, 0x0816e560) = 0
ldap_set_option(0x0816e560, 9, 1, 0x080fb40c, 0x0816e560) = 0
ldap_bind_s(0x0816e560, 0, 0, 128, 0 <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

Comment 6 Marc Wallman 2003-12-29 21:55:06 UTC
I see a number of folks joined the CC list. Is anybody at RH working
on this? Is it known to be working anywhwere? This problem occurs for
me every time and I have an almost identical configuration running
under RH 8 that works fine. I think this is a bug, not a configuration
error.

Comment 7 Jp Robinson 2004-01-09 15:07:58 UTC
Please be assured that we are working on it, however, please realize
the some of this involves internal discussion and not all comments are
visible. 

Thanks,
Jp


Comment 13 Marc Wallman 2004-01-14 12:11:46 UTC
Thomas,

Will the packages you listed in comment #12 be released as an errata 
package to the relevant RHN channels?

FYI, I also found that replacing the openldap-* packages shipped by 
red hat with openldap 2.1.22 packages fixes the sendmail ldap routing 
problem as well.

Comment 14 Marc Wallman 2004-01-16 22:55:59 UTC
I've been running the packages listed in comment #12 in production for
the last 36 hours or so and they are doing just fine.

Comment 35 Thomas Woerner 2004-02-27 09:15:19 UTC
The package (#34) will be in the next update.

Comment 36 John Dennis 2004-03-15 15:37:42 UTC
*** Bug 118234 has been marked as a duplicate of this bug. ***

Comment 37 Matthew Crawford 2004-04-21 00:59:59 UTC
Thomas,

The link provided at: http://people.redhat.com/twoerner/SRPMS/3.0E/sendmail-8.12.11
-3.src.rpm does not contain the SRPM package. Can you please correct?

Comment 38 Thomas Woerner 2004-04-21 12:02:21 UTC
DONE.

Comment 39 Oliver Jones 2005-04-12 12:29:25 UTC
I have the same problem with my RHEL 2.1 server (trying to enable LDAP Aliases
etc).  Sendmail SEGV's after the RCPT TO: envelope header.  

I must admit however that I'm using a rebuild of the RHL 7.3 sendmail RPM on
this server though.  The main reason for that was to get SSL support as the
original RHEL 2.1 sendmail didn't link to OpenSSL.

Is there a build of sendmail-8.12.11 available for RHEL 2.1?


Note You need to log in before you can comment on or make changes to this bug.