<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>protocol lmtp {</div><div> userdb {</div><div> driver = sql</div><div> args = /path/to/dovecot-sql.conf.ext</div><div> }</div><div>}</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">---<div>Aki Tuomi</div><div>Dovecot oy</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Andras Kemeny <pdx@pdx.hu> </div><div>Date: 02/08/2018 01:35 (GMT+02:00) </div><div>To: dovecot@dovecot.org </div><div>Subject: LMTP error, mysterious </div><div><br></div></div>hi (especially to you, Aki),<br><br>so to solve the previous UID issue, i went the full LMTP route. however, <br>i seem to be having problems with the prefetch userdb (i'm trying to <br>minimize load on the LDAP server). namely, the log says:<br><br>Aug 2 00:15:35 rhyno postfix/submission/smtpd[21158]: 5EEF35C05C5: <br>client=localhost[127.0.0.1], sasl_method=login, sasl_username=aik<br>Aug 2 00:15:40 rhyno postfix/cleanup[22201]: 5EEF35C05C5: <br>message-id=<20180801221535.5EEF35C05C5@beach.rhyno.tech><br>Aug 2 00:15:40 rhyno postfix/qmgr[17437]: 5EEF35C05C5: <br>from=<pdx@pdx.hu>, size=295, nrcpt=1 (queue active)<br>Aug 2 00:15:40 rhyno dovecot: lmtp(20321): Connect from local<br>Aug 2 00:15:40 rhyno dovecot: auth: Error: prefetch(aik@rhyno.tech): <br>userdb lookup not possible with only userdb prefetch<br>Aug 2 00:15:40 rhyno dovecot: lmtp(aik@rhyno.tech): Error: user <br>aik@rhyno.tech: Auth USER lookup failed<br>Aug 2 00:15:41 rhyno postfix/lmtp[22211]: 5EEF35C05C5: <br>to=<aik@rhyno.tech>, relay=beach.rhyno.tech[private/dovecot-lmtp], <br>delay=13, delays=13/0.01/0/0.03, dsn=4.3.0, status=deferred (host <br>beach.rhyno.tech[private/dovecot-lmtp] said: 451 4.3.0 <aik@rhyno.tech> <br>Internal error occurred. Refer to server log for more information. (in <br>reply to RCPT TO command))<br>Aug 2 00:15:41 rhyno dovecot: lmtp(20321): Disconnect from local: <br>Successful quit<br>Aug 2 00:15:42 rhyno postfix/submission/smtpd[21158]: disconnect from <br>localhost[127.0.0.1] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6<br><br>(the above is a transcript of a full session i've done over telneting to <br>localhost 587 and auth login-ing with valid credentials)<br><br>so, i've tested the actual login process, and it works flawlessly, and <br>it looks like IMAP is up and running:<br><br>Connected to localhost.<br>Escape character is '^]'.<br>* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE <br>IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.<br>0 login aik@rhyno.tech ofCourseThisIsN0TtheRealPassword<br>0 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE <br>IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS <br>THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN <br>NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH <br>ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE <br>SPECIAL-USE] Logged in<br>1 list "" "%"<br>* LIST (\HasNoChildren \Sent) "." Sent<br>* LIST (\HasNoChildren \Trash) "." Trash<br>* LIST (\HasNoChildren) "." INBOX<br>1 OK List completed (0.000 + 0.000 secs).<br>2 status INBOX (MESSAGES)<br>* STATUS INBOX (MESSAGES 2)<br>2 OK Status completed (0.000 + 0.000 secs).<br><br>this is how i send the test mails:<br><br>Connected to localhost.<br>Escape character is '^]'.<br>220 beach.rhyno.tech mail server<br>ehlo x<br>250-beach.rhyno.tech<br>250-PIPELINING<br>250-SIZE 10240000<br>250-ETRN<br>250-STARTTLS<br>250-AUTH PLAIN LOGIN<br>250-AUTH=PLAIN LOGIN<br>250-ENHANCEDSTATUSCODES<br>250-8BITMIME<br>250-DSN<br>250 SMTPUTF8<br>auth login<br>334 VXNlcm5hbWU6<br>***obviously_masked***<br>334 UGFzc3dvcmQ6<br>***obviously_masked***<br>235 2.7.0 Authentication successful<br>mail from:<pdx@pdx.hu><br>250 2.1.0 Ok<br>rcpt to:<aik@rhyno.tech><br>250 2.1.5 Ok<br>data<br>354 End data with <CR><LF>.<CR><LF><br>test<br>.<br>250 2.0.0 Ok: queued as 5EEF35C05C5<br>quit<br>221 2.0.0 Bye<br>Connection closed by foreign host.<br><br>my concern is these two:<br><br>Aug 2 00:15:40 rhyno dovecot: auth: Error: prefetch(aik@rhyno.tech): <br>userdb lookup not possible with only userdb prefetch<br>Aug 2 00:15:40 rhyno dovecot: lmtp(aik@rhyno.tech): Error: user <br>aik@rhyno.tech: Auth USER lookup failed<br><br>10-auth.conf has these settings:<br><br>passdb {<br> driver = ldap<br> args = /etc/dovecot/dovecot-ldap.conf.ext<br>}<br>userdb {<br> driver = prefetch<br>}<br><br>dovecot-ldap.conf.ext has these settings (only the relevant ones)<br><br>dn = ***whatever, it works***<br>dnpass = ***whatever, it works***<br>auth_bind = no<br>base = dc=rhyno,dc=tech<br>pass_attrs = \<br> =user=%{ldap:uid}, \<br> =password=%{ldap:userPassword}, \<br> =userdb_home=%{ldap:homeDirectory}, \<br> =userdb_uid=%{ldap:uidNumber}, \<br> =userdb_gid=%{ldap:gidNumber}<br>pass_filter = <br>(&(objectclass=postfixUser)(mailacceptinggeneralid=%n)(mailacceptinggeneralid=@%d))<br><br>so what am i missing? also, this format of setting variables <br>(=<output_field>=%{<whatever_special_result_field>}) is never explained <br>on the wiki (or am i just blind?)<br><br>thanks in advance,<br>a<br><br></body></html>