can you start smtpd with -dv -T lookup -T table ? this should provide a bit more information about the ldap lookup
On Wed, Mar 05, 2014 at 06:08:35PM +0100, Joel Carnat wrote: > I've just compiled and installed 5.4.2. > > Not sure why, but smtpd still crashes after a LDAP lookup. > > ### SMTPD CONFIGURATION (there may be some garbage as I am still digging ;-) > # egrep -v "^$|^#" /etc/mail/smtpd.conf.local > > lan_addr = "192.168.0.128" > listen on all > table aliases db:/etc/mail/aliases.db > table relay-hosts db:/etc/mail/relay-hosts.db > table virtual-domains db:/etc/mail/virtual-domains.db > table virtual-users ldap:/etc/mail/virtual-users.conf > accept for domain "foo.net" virtual <virtual-users> deliver to maildir > "/home/vmail/%{dest.user}" > accept from source <relay-hosts> for any relay > > # egrep -v "^$|^#" /etc/mail/relay-hosts > 127.0.0.1 YES > 192.168.0.0/24 YES > > # egrep -v "^$|^#" /etc/mail/virtual-domains > foo.net OK > bar.net OK > > # egrep -v "^$|^#" /etc/mail/virtual-users.conf > url ldap://127.0.0.1 > username cn=email,ou=users,dc=local > password vierge > basedn dc=local > userinfo_filter (&(objectClass=inetOrgPerson)(mail=%s)) > userinfo_attributes mail > credentials_filter (&(objectClass=inetOrgPerson)(mail=%s)) > credentials_attributes mail,userPassword > alias_filter (&(objectClass=inetOrgPerson)(mail=%s)) > alias_attributes mail > > > ### THE MAIL CLIENT > # telnet 192.168.0.128 25 > Trying 192.168.0.128... > Connected to 192.168.0.128. > Escape character is '^]'. > 220 bagheera.local ESMTP OpenSMTPD > helo macbook > 250 bagheera.local Hello macbook [192.168.0.21], pleased to meet you > mail from: <j...@carnat.net> > 250 2.0.0: Ok > rcpt to: <j...@foo.net> > 250 2.1.5 Destination address valid: Recipient ok > data > 354 Enter mail, end with "." on a line by itself > test > . > 250 2.0.0: 103214a3 Message accepted for delivery > Connection closed by foreign host. > > ### THE SMTPD LOG > debug: smtp: new client on listener: 0x19c7d226c000 > smtp-in: New session 29e925d57787e672 from host 192.168.0.21 [192.168.0.21] > debug: 0x19c7d5549000: end of message, msgflags=0x0000 > smtp-in: Accepted message 103214a3 on session 29e925d57787e672: > from=<j...@carnat.net>, to=<j...@foo.net>, size=5, ndest=1, proto=SMTP > debug: scheduler: evp:103214a36b0ca766 scheduled (mta) > debug: mta: received evp:103214a36b0ca766 for <j...@foo.net> > debug: mta: draining [relay:foo.net] refcount=1, ntask=1, nconnector=0, > nconn=0 > debug: mta: querying MX for [relay:foo.net]... > debug: mta: [relay:foo.net] waiting for MX > debug: MXs for domain foo.net: > 192.168.0.128 preference 10 > debug: mta: ... got mx (0x19c7cde103a0, foo.net, [relay:foo.net]) > debug: mta: draining [relay:foo.net] refcount=1, ntask=1, nconnector=0, > nconn=0 > debug: mta: querying source for [relay:foo.net]... > debug: mta: ... got source for [relay:foo.net]: [] > debug: mta: new [connector:[]->[relay:foo.net],0x10000] > debug: mta: connecting with [connector:[]->[relay:foo.net],0x0] > debug: mta-routing: searching new route for > [connector:[]->[relay:foo.net],0x0]... > debug: mta-routing: selecting candidate route [] <-> 192.168.0.128 > debug: mta-routing: spawning new connection on [] <-> 192.168.0.128 > debug: mta: 0x19c7d98d8c00: spawned for relay [relay:foo.net] > debug: mta: connecting with [connector:[]->[relay:foo.net],0x0] > debug: mta: cannot use [relay:foo.net] before 2s > debug: mta-routing: no route available for > [connector:[]->[relay:foo.net],0x0]: must wait a bit > debug: mta: retrying to connect on [connector:[]->[relay:foo.net],0x0] in > 2s... > debug: mta: draining [relay:foo.net] refcount=3, ntask=1, nconnector=1, > nconn=1 > debug: mta: scheduling relay [relay:foo.net] in 1s... > smtp-out: Connecting to smtp+tls://192.168.0.128:25 (bagheera.local.) on > session de8f21dcdbc05dcc... > debug: smtp: new client on listener: 0x19c7d226c000 > smtp-out: Connected on session de8f21dcdbc05dcc > smtp-in: New session 29e925d6c137dcb8 from host bagheera.local. > [192.168.0.128] > debug: mta-routing: route [] <-> 192.168.0.128 (bagheera.local.) is now valid. > debug: mta: connecting with [connector:[]->[relay:foo.net],0x20000] > debug: mta: canceling connector timeout > debug: mta: enough connections already > debug: mta: 0x19c7d98d8c00: handling next task for relay [relay:foo.net] > debug: table_ldap_internal_query: > filter=(&(objectClass=inetOrgPerson)(mail=j...@foo.net)), ret=1 > Segmentation fault > warn: table-proc: pipe closed > fatal: table-proc: exiting > warn: queue -> lka: pipe closed > warn: smtp -> lka: pipe closed > warn: mta -> lka: pipe closed > warn: control -> lka: pipe closed > warn: mda -> lka: pipe closed > warn: mfa -> smtp: pipe closed > warn: scheduler -> control: pipe closed > warn: parent -> lka: pipe closed > > ### THE LDAPD LOG > Mar 5 17:57:39.356 [20646] consumed 125 bytes > Mar 5 17:57:39.356 [20646] got request type 3, id 2 > Mar 5 17:57:39.356 [20646] base dn = dc=local, scope = 2 > Mar 5 17:57:39.356 [20646] requesting 01 access to dc=local by > cn=email,ou=users,dc=local, in namespace dc=local > Mar 5 17:57:39.356 [20646] init index scan on [mail=j...@foo.net,] > Mar 5 17:57:39.356 [20646] found index > mail=j...@foo.net,mail=j...@foo.net,ou=users,ou=foo.net, > Mar 5 17:57:39.356 [20646] lookup indexed key > [mail=j...@foo.net,ou=users,ou=foo.net,dc=local] > Mar 5 17:57:39.356 [20646] found dn > mail=j...@foo.net,ou=users,ou=foo.net,dc=local > Mar 5 17:57:39.356 [20646] requesting 01 access to > mail=j...@foo.net,ou=users,ou=foo.net,dc=local by cn=email,ou=users,dc=local, > in namespace dc=local > Mar 5 17:57:39.356 [20646] found index > mail=maria...@bar.net,mail=maria...@bar.net,ou=users,ou=bar.net, > Mar 5 17:57:39.356 [20646] scanned past index prefix [mail=j...@foo.net,] > Mar 5 17:57:39.357 [20646] 1 scanned, 1 matched, 0 dups > Mar 5 17:57:39.357 [20646] sending response 5 with result 0 > Mar 5 17:57:39.357 [20646] finished search on msgid 2 > Mar 5 17:57:39.357 [20646] end-of-file on connection 12 > Mar 5 17:57:39.357 [20646] closing connection 12 > > ### THE LDAP CLIENT > # ldapsearch -H ldap://127.0.0.1 -D "cn=email,ou=users,dc=local" -w vierge -b > "dc=local" "(&(objectClass=inetOrgPerson)(mail=j...@foo.net))" > (...) > dn: mail=j...@foo.net,ou=users,ou=foo.net,dc=local > objectClass: top > objectClass: person > objectClass: organizationalPerson > objectClass: inetOrgPerson > cn: Joel Carnat > sn: Carnat > givenName: Joel > mail: j...@foo.net > userPassword:: dmllcmdl > > # search result > search: 2 > result: 0 Success > > # numResponses: 2 > # numEntries: 1 > > Le 5 mars 2014 ? 10:27, Gilles Chehade <gil...@poolp.org> a ?crit : > > > Well, first question first, does it work for you ? :-) > > > > On Wed, Mar 05, 2014 at 07:59:27AM +0100, Joel Carnat wrote: > >> Will for LDAP here. :) > >> Feel free to MP. French or English. > >> > >> -- > >> e-mail different > >> > >>> Le 5 mars 2014 ?? 02:35, Gilles Chehade <gil...@poolp.org> a ??crit : > >>> > >>> Hi, > >>> > >>> We have just released a minor stable version and hopefully we should not > >>> see another minor release before OpenSMTPD 5.5.0 comes out several weeks > >>> from now. > >>> > >>> In the meantime, I'd like to stabilize table_ldap and table_postgres, so > >>> we could *maybe* stop shipping them as experimental with our next big > >>> release. > >>> > >>> If people willing to use ldap or postgres could get in touch with me, it > >>> would be nice ;-) > >>> > >>> -- > >>> Gilles Chehade > >>> > >>> https://www.poolp.org @poolpOrg > >>> > >>> -- > >>> You received this mail because you are subscribed to misc@opensmtpd.org > >>> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > >>> > >> > >> -- > >> You received this mail because you are subscribed to misc@opensmtpd.org > >> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > >> > > > > -- > > Gilles Chehade > > > > https://www.poolp.org @poolpOrg > > > > -- > > You received this mail because you are subscribed to misc@opensmtpd.org > > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > > > > > -- > You received this mail because you are subscribed to misc@opensmtpd.org > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org