<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=PT-BR link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi Folks,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US>I’m having a little trouble to put dovecot
authenticating in ldap.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>My postfix and saslauthd are authenticating
fine.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Here is what I have in my main.cf:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US># Accounts<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accounts_server_host = $ldap_server_host<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accounts_search_base = $ldap_search_base<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accounts_query_filter =
(&(&(objectClass=VirtualMailAccount)(mail=%s))(forwardActive=FALSE)(accountActive=TRUE)(delete=FALSE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accounts_result_attribute = mailbox<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accounts_cache = no<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US># aliases<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>aliases_server_host = $ldap_server_host<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>aliases_search_base = $ldap_search_base<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>aliases_query_filter =
(&(&(objectClass=VirtualMailAlias)(mail=%s))(accountActive=TRUE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>aliases_result_attribute = maildrop<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>aliases_cache = no<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accountsmap_server_host = $ldap_server_host<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accountsmap_search_base = $ldap_search_base<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accountsmap_query_filter =
(&(&(objectClass=VirtualMailAccount)(mail=%s))(forwardActive=FALSE)(accountActive=TRUE)(delete=FALSE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accountsmap_result_attribute = mail<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>accountsmap_cache = no<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US># VirtualForward<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>virtualforward_server_host =
$ldap_server_host<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>virtualforward_search_base =
$ldap_search_base<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>virtualforward_query_filter =
(&(&(objectClass=VirtualMailAccount)(mail=%s))(forwardActive=TRUE)(accountActive=TRUE)(delete=FALSE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>virtualforward_result_attribute = maildrop<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>virtualforward_cache = no<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>My saslauthd.conf follows as:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_servers:
ldap://myldapserver/<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_version:
3<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_auth_method:
bind<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_bind_dn:
uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_bind_pw:
xxxx<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_search_base:
dc=domain,dc=com<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>#ldap_filter:
(|(mail=%u)(cn=%U))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_filter:
(&(|(mail=%u)(cn=%U)(mail=%U@%d))(accountActive=TRUE)(delete=FALSE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>PS: Removed my real server and search_base.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Here is the test with saslauthd
configuration:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>testsaslauthd -u novoemail01 -p teste123<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>0: OK "Success."<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>And here is my dovecot-ldap.conf:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>hosts = myldapserver<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dn =
uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dnpass = xxxx<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ldap_version = 3<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>base = dc=domain,dc=com<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>user_attrs = mail,,,,,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>user_filter =
(&(objectClass=VirtualMailAccount)(mail=%u)(accountActive=TRUE)(delete=FALSE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>pass_attrs = mail,userPassword<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>pass_filter =
(&(objectClass=VirtualMailAccount)(mail=%u)(accountActive=TRUE)(delete=FALSE))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>default_pass_scheme = SSHA<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>When I try to authenticate, my mail.info
get this:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dovecot: auth(default): client in:
AUTH 1 PLAIN
service=POP3
lip=200.155.34.10
rip=200.155.63.82 resp=AG5vdm9lbWFpbDAxAHRlc3RlMTIz<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dovecot: auth(default):
ldap(novoemail01,200.155.63.82): pass search: base=dc=sercomtel,dc=com,dc=br
scope=subtree filter=(&(objectClass=VirtualMailAccount)(mail=novoemail01)(accountActive=TRUE)(delete=FALSE))
fields=mail,userPassword<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dovecot: auth(default):
ldap(novoemail01,200.155.63.82): unknown user<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dovecot: auth(default): client out:
FAIL 1 user=novoemail01<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Does anyone have an idea where I’m
failing to configure this or find a misconfiguration?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Tnx for any help.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Best Regards,<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-family:"Arial Black","sans-serif";color:navy'>Venilton
C. Junior<br>
<br>
</span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
</div>
</body>
</html>