From: DM on


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-address(a)univ-lille1.fr>... User unknown

Could you help me ?

Thanks in advance
Dominique <-dot-> Marant <-at-> univ-lille1 <-dot-> fr
From: Andrzej Adam Filip on
DM <nospam(a)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-address(a)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-address(a)univ-lille1.fr' | sendmail -d60.5 -d38.99 -bt

--
[pl>en Andrew] Andrzej Adam Filip : anfi(a)onet.eu : Andrzej.Filip(a)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
From: DM on
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Andrzej Adam Filip a &eacute;crit&nbsp;:
<blockquote cite="mid:ey04auimt1+A3O(a)suzanne.huge.strangled.net"
type="cite">
<pre wrap="">DM <a class="moz-txt-link-rfc2396E" href="mailto:nospam(a)nospam.net">&lt;nospam(a)nospam.net&gt;</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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&lt;TMPF&gt; -v mailRoutingAddress -k
(&amp;(|(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:
<a class="moz-txt-link-rfc2396E" href="mailto:vadid-address(a)univ-lille1.fr">&lt;vadid-address(a)univ-lille1.fr&gt;</a>... User unknown

Could you help me ?
</pre>
</blockquote>
<pre wrap=""><!---->
1) Could you post *all* log entries generated by the message? [o2N9qrZ0021846]
2) Do you use LDAP to fill classes in sendmail.cf?
[ <a class="moz-txt-link-freetext" href="http://www.sendmail.org/m4/ldap.html#classes">http://www.sendmail.org/m4/ldap.html#classes</a> ]
3) Could you post debug output produced by the command below?
[ execute it as root ]
echo '3,0 <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>' | sendmail -d60.5 -d38.99 -bt
</pre>
</blockquote>
<br>
For the tests, I put&nbsp; voluntarily pcpdm.univ-lille1.fr that is not
responding on ldap port :<br>
define(`confLDAP_DEFAULT_SPEC',`-h "pcpdm.univ-lille1.fr" -b
dc=univ-lille1,dc=fr')<br>
<br>
1)<br>
# grep o2N9qrZ0021846 /var/log/mail/mail.log.2<br>
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<br>
Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846:
<a class="moz-txt-link-rfc2396E" href="mailto:valid-address(a)univ-lille1.fr">&lt;valid-address(a)univ-lille1.fr&gt;</a>... User unknown<br>
Mar 23 10:56:02 smtp03 sm-mta[21846]: o2N9qrZ0021846:
from=<a class="moz-txt-link-rfc2396E" href="mailto:root(a)carmel-test.univ-lille1.fr">&lt;root(a)carmel-test.univ-lille1.fr&gt;</a>, size=1426, class=0,
nrcpts=0, proto=ESMTP, daemon=MTA, relay=carmel-test.univ-lille1.fr
[193.49.225.92]<br>
<br>
<br>
2)<br>
No<br>
<br>
3)<br>
# echo '3,0 <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>' | sendmail -d60.5 -d38.99 -bt<br>
seq_map_parse(aliases.files, )<br>
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)<br>
Enter &lt;ruleset&gt; &lt;address&gt;<br>
&gt; canonify&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: vadid-address @ univ-lille1 . fr<br>
Canonify2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: vadid-address &lt; @ univ-lille1 . fr &gt;<br>
openmap()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host:host NULL: valid<br>
map_lookup(host, univ-lille1.fr, %0=univ-lille1.fr) =&gt;
getcanonname(univ-lille1.fr), trying files<br>
text_getcanonname(univ-lille1.fr)<br>
getcanonname(univ-lille1.fr), trying dns<br>
getcanonname(univ-lille1.fr), found<br>
univ-lille1.fr. (0)<br>
Canonify2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
canonify&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
parse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
Parse0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
Parse0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
ParseLocal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
ParseLocal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
Parse1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
LDAPExpand&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input: &lt; vadid-address &lt; @ univ-lille1 . fr .
&gt; &gt; &lt; vadid-address @ univ-lille1 . fr &gt; &lt; &gt;<br>
ldapmap_open(ldapmra, 0): opening new connection<br>
<br>
<b>&lt;&lt;&lt;&lt;&lt;&lt;&nbsp; HERE, it stays a very long time before to
continue, 2 ou 3 minutes&nbsp; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
<br>
</b>ldap_init/ldap_bind failed to pcpdm.univ-lille1.fr in map ldapmra:
Unknown error 325<br>
openmap()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="ldap:ldapmra">ldap:ldapmra</a> NULL: invalid<br>
map_lookup(ldapmra, <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>,
%0=vadid-address(a)univ-lille1.fr) =&gt; NOT FOUND (75)<br>
map_lookup(ldapmra, <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>) tempfail: errno=0<br>
map_lookup tempfail: returning
"<a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>&lt;TMPF&gt;"<br>
openmap()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; null:ldapmh NULL: valid<br>
map_lookup(ldapmh, <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>,
%0=vadid-address(a)univ-lille1.fr) =&gt; NOT FOUND (68)<br>
LDAPExpand&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: vadid-address &lt; @ univ-lille1 . fr . &gt;<br>
hash_map_open(virtuser, /etc/mail/virtusertable, 0)<br>
openmap()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hash:virtuser /etc/mail/virtusertable: valid<br>
map_lookup(virtuser, <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>,
%0=vadid-address(a)univ-lille1.fr, %1=vadid-address) =&gt;
db_map_lookup(virtuser, <a class="moz-txt-link-abbreviated" href="mailto:vadid-address(a)univ-lille1.fr">vadid-address(a)univ-lille1.fr</a>)<br>
NOT FOUND (0)<br>
map_lookup(virtuser, @univ-lille1.fr, %0=(a)univ-lille1.fr,
%1=vadid-address) =&gt; db_map_lookup(virtuser, @univ-lille1.fr)<br>
error:nouser 550 User unknown (0)<br>
openmap()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dequote:dequote NULL: valid<br>
map_lookup(dequote, nouser, %0=nouser) =&gt; NOT FOUND (0)<br>
Parse1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: $# error $@ nouser $: 550 User unknown<br>
parse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returns: $# error $@ nouser $: 550 User unknown<br>
== Ruleset 0 (0) status 75<br>
&gt; closemaps: closing ldapmh (NULL)<br>
closemaps: closing ldapmra (NULL)<br>
closemaps: closing host (NULL)<br>
closemaps: closing dequote (NULL)<br>
closemaps: closing virtuser (/etc/mail/virtusertable)<br>
db_map_close(virtuser, /etc/mail/virtusertable, 1000121)<br>
<br>
<br>
Thanks very much if you can help me...<br>
<br>
<br>
<br>
<br>
</body>
</html>
From: Andrzej Adam Filip on
DM <nospam(a)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-address(a)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" ;-)

--
[pl>en Andrew] Andrzej Adam Filip : anfi(a)onet.eu : Andrzej.Filip(a)gmail.com
History teaches us that men and nations behave wisely once they have
exhausted all other alternatives.
-- Abba Eban
From: Andrzej Adam Filip on
Andrzej Adam Filip <anfi(a)onet.eu> wrote:
> DM <nospam(a)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-address(a)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