[Dovecot] 'unknown user' using dovecot LDA

Charles Marcus CMarcus at Media-Brokers.com
Sun Dec 22 17:43:39 EET 2013


Ok, one more issue to resolve.

The old server was still using the postfix/virtual for delivery, but the 
new one is using the dovecot LDA.

Now, when an email generated locally by a cron job is delivered, this 
shows in the log:

2013-12-22T10:29:55-05:00 host postfix/pickup[31400]: C67FD90F676B2: 
uid=0 from=<newsrv+rkhunter at example.com>
2013-12-22T10:29:55-05:00 host postfix/cleanup[22349]: C67FD90F676B2: 
message-id=<20131222152955.C67FD90F676B2 at smtp2.example.com>
2013-12-22T10:29:55-05:00 host postfix/qmgr[31401]: C67FD90F676B2: 
from=<newsrv+rkhunter at example.com>, size=1555, nrcpt=1 (queue active)
2013-12-22T10:29:55-05:00 host dovecot: auth-worker(22365): 
passwd(user1 at example.com): unknown user
2013-12-22T10:29:55-05:00 host dovecot: lda(user1 at example.com): 
msgid=<20131222152955.C67FD90F676B2 at smtp2.example.com>: saved mail to INBOX
2013-12-22T10:29:55-05:00 host postfix/pipe[22361]: C67FD90F676B2: 
to=<user1+rkhunter-report at example.com>, relay=dovecot, delay=0.06, 
delays=0.02/0/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)
2013-12-22T10:29:55-05:00 host postfix/qmgr[31401]: C67FD90F676B2: removed

The mail was delivered (as the log also clearly shows), but what is with 
the 'unknown user'?

I'm not sure how I can test my maps with dovecot, but testing with 
postfix shows:

  # postmap -q user1 at example.com mysql:/etc/postfix/maps/mysql/vmm.cf
example.com/user1/

Which is correct.

And my dovecot-sql-conf.ext contains:

driver = mysql
connect = "host=localhost dbname=db_name user=dbuser password=password"
default_pass_scheme = CRYPT
password_query = \
   SELECT username AS user, password \
   FROM mailbox WHERE username = '%u'
user_query = \
   SELECT CONCAT('/var/vmail/', maildir) AS home \
   FROM mailbox WHERE username = '%u'
iterate_query = SELECT username AS user FROM mailbox

I confirmed the db info is identical to what postfix is using.

Oh - and in order to make sure that all usernames are lowercased, 
shouldn't I change '%u' above to '%Lu'?

Appreciate any suggestions on where to go next... thanks

-- 

Best regards,

*/Charles/*


More information about the dovecot mailing list