<span class="Apple-style-span" style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px">I have been using the following LOCAL_CONFIG to validate local addresses and aliases but am switching to LDAP to manage users and aliases and am having troubles getting this to work. I am using a dual-sendmail environment with amavisd and need the rx-side to validate local users and aliases before sending to amavisd. <br>
<br>Old <a href="http://sendmail-rx.mc/" target="_blank" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;text-decoration:none;color:rgb(17,85,204)">sendmail-rx.mc</a>: <br>
********** <br>LOCAL_CONFIG <br>Kaliasp hash -m /etc/aliases <br>Kuserp user -m <br><br>LOCAL_RULESETS <br>SLocal_check_rcpt <br>R$* $: <?> $&{rcpt_addr} <br>R<?> $+ @ $=w $: <@> $1 mark local address <br>
R<?> $* @ $* $@ OK ignore remote address <br>R<?> $+ $: <@> $1 mark unqualified user <br>R<@> $+ + $* $: < $(aliasp $1+$2 $: @ $) > $1 + * plussed alias? <br>
R<@> $+ + $* $: < $(aliasp $1+$2 $: @ $) > $1 +* alias? <br>R<@> $+ $: < $(aliasp $1 $: @ $) > $1 normal alias? <br>R<@> $+ $: < $(userp $1 $: @ $) > $1 system user? <br>
R<@> $+ $#error $@ 5.1.1 $: "550 User unknown" nope, go away <br>********** <br><br>New <a href="http://sendmail-rx.mc/" target="_blank" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;text-decoration:none;color:rgb(17,85,204)">sendmail-rx.mc</a>: <br>
********** <br>LOCAL_CONFIG <br>Kaliasp ldap -1 -T<TMPF> -v mailRoutingAddress -k (&(objectClass=nisMailAlias)(cn=%0)) <br>Kuserp ldap -1 -T<TMPF> -v mailRoutingAddress -k (&(objectClass=person)(uid=%0)) <br>
<br>LOCAL_RULESETS <br>SLocal_check_rcpt <br>R$* $: <?> $&{rcpt_addr} <br>R<?> $+ @ $=w $: <@> $1 mark local address <br>R<?> $* @ $* $@ OK ignore remote address <br>
R<?> $+ $: <@> $1 mark unqualified user <br>R<@> $+ + $* $: < $(aliasp $1+$2 $: @ $) > $1 + * plussed alias? <br>R<@> $+ + $* $: < $(aliasp $1+$2 $: @ $) > $1 +* alias? <br>
R<@> $+ $: < $(aliasp $1 $: @ $) > $1 normal alias? <br>R<@> $+ $: < $(userp $1 $: @ $) > $1 system user? <br>R<@> $+ $#error $@ 5.1.1 $: "550 User unknown" nope, go away <br>
********** <br><br>I am using LAM to manage users and email aliases on the LDAP server (read: default schema), so aliases have objectClass=nisMailAlias with cn=aliasname. Users have objectClass=person with uid=username and mail=<a href="mailto:username@domainname.com" target="_blank" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;text-decoration:none;color:rgb(17,85,204)">username@domainname.com</a>, and possibly (multiple) mailLocalAddress=<a href="mailto:useralias@domainname.com" target="_blank" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;text-decoration:none;color:rgb(17,85,204)">useralias@domainname.com</a>. </span><div>
<span class="Apple-style-span" style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div><div><span class="Apple-style-span" style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px">Any ideas on how to get the ruleset to work with LDAP?</span></div>