Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ldap_routing tempfail

157 views
Skip to first unread message

DM

unread,
Mar 23, 2010, 6:05:32 AM3/23/10
to

we expected that, when the ldap server fails, sendmail would return a
4xx TEMPFAIL at the SMTP dialog, but unfortunately it returns "User
Unknown" !

So, I use "tempfail" in the FEATURE ldap_routing :
FEATURE(`ldap_routing',null,`ldap -1 -T<TMPF> -v mailRoutingAddress -k
(&(|(objectClass=uPerson)(objectClass=uService)(objectClass=uEtuPerson))(|(mailLocalAddress=%0)
(mail=%0)))',`bounce',,`tempfail')


but it seems that the tempfail has no effect :

Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: SYSERR(root):
ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra:
Unknown error 325
Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846:
<vadid-...@univ-lille1.fr>... User unknown

Could you help me ?

Thanks in advance
Dominique <-dot-> Marant <-at-> univ-lille1 <-dot-> fr

Andrzej Adam Filip

unread,
Mar 24, 2010, 3:10:57 AM3/24/10
to

1) Could you post *all* log entries generated by the message? [o2N9qrZ0021846]
2) Do you use LDAP to fill classes in sendmail.cf?
[ http://www.sendmail.org/m4/ldap.html#classes ]
3) Could you post debug output produced by the command below?
[ execute it as root ]
echo '3,0 vadid-...@univ-lille1.fr' | sendmail -d60.5 -d38.99 -bt

--
[pl>en Andrew] Andrzej Adam Filip : an...@onet.eu : Andrze...@gmail.com
Despite the best efforts of a quantum bigfoot drive (yes I know everyone
told me they suck, now I know they were right) 2.1.109ac1 is now available
-- Alan Cox announcing Linux 2.1.109ac1

DM

unread,
Mar 25, 2010, 9:51:52 AM3/25/10
to
Andrzej Adam Filip a écrit :
DM <nos...@nospam.net> wrote:
  
we expected that, when the ldap server fails, sendmail would return a
4xx TEMPFAIL at the SMTP dialog, but unfortunately it returns "User
Unknown" !

So, I use "tempfail" in the FEATURE ldap_routing :
FEATURE(`ldap_routing',null,`ldap -1 -T<TMPF> -v mailRoutingAddress -k 
(&(|(objectClass=uPerson)(objectClass=uService)(objectClass=uEtuPerson))(|(mailLocalAddress=%0)
(mail=%0)))',`bounce',,`tempfail')


but it seems that the tempfail has no effect :

Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: SYSERR(root):
ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra:
Unknown error 325
Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846:
<vadid-...@univ-lille1.fr>... User unknown

Could you help me ?
    
1) Could you post *all* log entries generated by the message? [o2N9qrZ0021846] 
2) Do you use LDAP to fill classes in sendmail.cf?
   [ http://www.sendmail.org/m4/ldap.html#classes ]
3) Could you post debug output produced by the command below?
   [ execute it as root ]
   echo '3,0 vadid-...@univ-lille1.fr' | sendmail -d60.5 -d38.99 -bt
  

For the tests, I put  voluntarily pcpdm.univ-lille1.fr that is not responding on ldap port :
define(`confLDAP_DEFAULT_SPEC',`-h "pcpdm.univ-lille1.fr" -b dc=univ-lille1,dc=fr')

1)
# grep o2N9qrZ0021846 /var/log/mail/mail.log.2

Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: SYSERR(root): ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra: Unknown error 325
Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: <valid-...@univ-lille1.fr>... User unknown
Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: from=<ro...@carmel-test.univ-lille1.fr>, size=1426, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=carmel-test.univ-lille1.fr [193.49.225.92]


2)
No

3)
# echo '3,0 vadid-...@univ-lille1.fr' | sendmail -d60.5 -d38.99 -bt
seq_map_parse(aliases.files, )
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> canonify           input: vadid-address @ univ-lille1 . fr
Canonify2          input: vadid-address < @ univ-lille1 . fr >
openmap()       host:host NULL: valid
map_lookup(host, univ-lille1.fr, %0=univ-lille1.fr) => getcanonname(univ-lille1.fr), trying files
text_getcanonname(univ-lille1.fr)
getcanonname(univ-lille1.fr), trying dns
getcanonname(univ-lille1.fr), found
univ-lille1.fr. (0)
Canonify2        returns: vadid-address < @ univ-lille1 . fr . >
canonify         returns: vadid-address < @ univ-lille1 . fr . >
parse              input: vadid-address < @ univ-lille1 . fr . >
Parse0             input: vadid-address < @ univ-lille1 . fr . >
Parse0           returns: vadid-address < @ univ-lille1 . fr . >
ParseLocal         input: vadid-address < @ univ-lille1 . fr . >
ParseLocal       returns: vadid-address < @ univ-lille1 . fr . >
Parse1             input: vadid-address < @ univ-lille1 . fr . >
LDAPExpand         input: < vadid-address < @ univ-lille1 . fr . > > < vadid-address @ univ-lille1 . fr > < >
ldapmap_open(ldapmra, 0): opening new connection

<<<<<<  HERE, it stays a very long time before to continue, 2 ou 3 minutes  >>>>>>>>

ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra: Unknown error 325
openmap()       ldap:ldapmra NULL: invalid
map_lookup(ldapmra, vadid-...@univ-lille1.fr, %0=vadid-...@univ-lille1.fr) => NOT FOUND (75)
map_lookup(ldapmra, vadid-...@univ-lille1.fr) tempfail: errno=0
map_lookup tempfail: returning "vadid-...@univ-lille1.fr<TMPF>"
openmap()       null:ldapmh NULL: valid
map_lookup(ldapmh, vadid-...@univ-lille1.fr, %0=vadid-...@univ-lille1.fr) => NOT FOUND (68)
LDAPExpand       returns: vadid-address < @ univ-lille1 . fr . >
hash_map_open(virtuser, /etc/mail/virtusertable, 0)
openmap()       hash:virtuser /etc/mail/virtusertable: valid
map_lookup(virtuser, vadid-...@univ-lille1.fr, %0=vadid-...@univ-lille1.fr, %1=vadid-address) => db_map_lookup(virtuser, vadid-...@univ-lille1.fr)
NOT FOUND (0)
map_lookup(virtuser, @univ-lille1.fr, %0=@univ-lille1.fr, %1=vadid-address) => db_map_lookup(virtuser, @univ-lille1.fr)
error:nouser 550 User unknown (0)
openmap()       dequote:dequote NULL: valid
map_lookup(dequote, nouser, %0=nouser) => NOT FOUND (0)
Parse1           returns: $# error $@ nouser $: 550 User unknown
parse            returns: $# error $@ nouser $: 550 User unknown
== Ruleset 0 (0) status 75
> closemaps: closing ldapmh (NULL)
closemaps: closing ldapmra (NULL)
closemaps: closing host (NULL)
closemaps: closing dequote (NULL)
closemaps: closing virtuser (/etc/mail/virtusertable)
db_map_close(virtuser, /etc/mail/virtusertable, 1000121)


Thanks very much if you can help me...




Andrzej Adam Filip

unread,
Mar 25, 2010, 2:20:24 PM3/25/10
to

I think you have "miss placed" tempfail argument
It should be *SIXTH* not *FIFTH* argument.

P.S.
Thank you for debug "hint" in another part of the thread.
I has shown me "the light" ;-)

--
[pl>en Andrew] Andrzej Adam Filip : an...@onet.eu : Andrze...@gmail.com

History teaches us that men and nations behave wisely once they have
exhausted all other alternatives.
-- Abba Eban

Andrzej Adam Filip

unread,
Mar 26, 2010, 12:38:36 PM3/26/10
to
Andrzej Adam Filip <an...@onet.eu> wrote:
> DM <nos...@nospam.net> wrote:
>> we expected that, when the ldap server fails, sendmail would return a
>> 4xx TEMPFAIL at the SMTP dialog, but unfortunately it returns "User
>> Unknown" !
>>
>> So, I use "tempfail" in the FEATURE ldap_routing :
>> FEATURE(`ldap_routing',null,`ldap -1 -T<TMPF> -v mailRoutingAddress -k
>> (&(|(objectClass=uPerson)(objectClass=uService)(objectClass=uEtuPerson))(|(mailLocalAddress=%0)
>> (mail=%0)))',`bounce',,`tempfail')
>>
>>
>> but it seems that the tempfail has no effect :
>>
>> Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: SYSERR(root):
>> ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra:
>> Unknown error 325
>> Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846:
>> <vadid-...@univ-lille1.fr>... User unknown
>>
>> Could you help me ?
>
> I think you have "miss placed" tempfail argument
> It should be *SIXTH* not *FIFTH* argument.
>
> P.S.
> Thank you for debug "hint" in another part of the thread.
> I has shown me "the light" ;-)

To be very precise: Instead of using
FEATURE(`ldap_routing',null,`ldap ...',`bounce',,`tempfail')
I suggested using
FEATURE(`ldap_routing',null,`ldap ...',`bounce',`',`',`tempfail')


<quote src="cf/README" version="sendmail-8.14.3">
FEATURE(`ldap_routing', <mailHost>, <mailRoutingAddress>, <bounce>,
<detail>, <nodomain>, <tempfail>)
</quote>

--
Open-Sendmail: http://open-sendmail.sourceforge.net/
Excess on occasion is exhilarating. It prevents moderation from
acquiring the deadening effect of a habit.
-- W. Somerset Maugham

D. Stussy

unread,
Mar 27, 2010, 2:22:19 AM3/27/10
to
"Andrzej Adam Filip" <an...@onet.eu> wrote in message
news:3stlt83...@brandon.huge.strangled.net...

> DM <nos...@nospam.net> wrote:
> > we expected that, when the ldap server fails, sendmail would return a
> > 4xx TEMPFAIL at the SMTP dialog, but unfortunately it returns "User
> > Unknown" !
> >
> > So, I use "tempfail" in the FEATURE ldap_routing :
> > FEATURE(`ldap_routing',null,`ldap -1 -T<TMPF> -v mailRoutingAddress -k
> >
(&(|(objectClass=uPerson)(objectClass=uService)(objectClass=uEtuPerson))(|(
mailLocalAddress=%0)
> > (mail=%0)))',`bounce',,`tempfail')
> >
> >
> > but it seems that the tempfail has no effect :
> >
> > Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846: SYSERR(root):
> > ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra:
> > Unknown error 325
> > Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846:
> > <vadid-...@univ-lille1.fr>... User unknown
> >
> > Could you help me ?
>
> I think you have "miss placed" tempfail argument
> It should be *SIXTH* not *FIFTH* argument.

By my count, it is the sixth argument. The feature name is the first.


Andrzej Adam Filip

unread,
Mar 27, 2010, 6:42:47 AM3/27/10
to

In my count "feature name" was argument zero.
More detailed version:
news:fcs14oc...@gloria.huge.strangled.net

--
Open-Sendmail: http://open-sendmail.sourceforge.net/
There's nothing remarkable about it. All one has to do is hit the right
keys at the right time and the instrument plays itself.
-- J. S. Bach

DM

unread,
Mar 31, 2010, 10:45:13 AM3/31/10
to
Andrzej Adam Filip a écrit :
Andrzej Adam Filip <an...@onet.eu> wrote:
  

Thanks very much, it's running correctly with :
  FEATURE(`ldpap_routing',`null',`ldap ...',`bounce',`',`',`tempfail')dnl

Regards
Dominique
0 new messages