-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 22-12-13 16:43, Charles Marcus wrote: > 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+rkhun...@example.com> > 2013-12-22T10:29:55-05:00 host postfix/cleanup[22349]: > C67FD90F676B2: > message-id=<20131222152955.c67fd90f67...@smtp2.example.com> > 2013-12-22T10:29:55-05:00 host postfix/qmgr[31401]: C67FD90F676B2: > from=<newsrv+rkhun...@example.com>, size=1555, nrcpt=1 (queue > active) 2013-12-22T10:29:55-05:00 host dovecot: > auth-worker(22365): passwd(us...@example.com): unknown user
This is an error from the passwd authentication backend, not from the mysql one you're checking below. Seems that you have 2 auth backends enabled in dovecot... > 2013-12-22T10:29:55-05:00 host dovecot: lda(us...@example.com): > msgid=<20131222152955.c67fd90f67...@smtp2.example.com>: saved mail > to INBOX 2013-12-22T10:29:55-05:00 host postfix/pipe[22361]: > C67FD90F676B2: to=<user1+rkhunter-rep...@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 us...@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 > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJStwoaAAoJEJPfMZ19VO/1MkIQAK2u3lQOUI6zHGQzoO7iNjQP OAHmFyn/QnPSRGd7O+EAHSG6vvz6QBgf0qpUSym8nPu+jDaG564eZwqfQu1cIa2c uerz0ZDYk8hu4XqKHP83c/A5SsoG8QbmO0LTwr3wSSvmvOS4G1agMqpZt2r5r2pG aiAbHgQYWbp906F0absak/W4XAIJltqiIxQ1QcFhhXjovmiQTxugiCgx7RhxY5dx Li1KWzGZbl9cANQvUn8Sy7UIkYtu40qcZn150DYq3iKKT2cA18PSSPA8Rur/zigT vidhIB+h0p+qNlGKs1rUlKifX2fD9JhGa/GinotBi33PTZPsTzVzYESgBYR9/nFH ekgraAJ+xHva2K0dKartzzddHvweAub0PxXn4YZw5X4fxYyITGuWqDBsB2Pn38XW xQRjWQ2nnjNH7YHrCiwAcykU71jT6kYJwSBp1SxkWRHlk9HTDPKH0P+SRJJ03Bri 2CfkutX8GNVNXlME2G1yqDhV03XOPziEwdRUSB5t2jgZWrMYTE21zfpLLLUYhNKa JYnShmpEkRk9VpGquk1fCTMZNtTIomdcqwtfd0r0cPwXFx2KVTBJfkvwR8CCX850 QgiwlTARaLrF8VVT9ujLP2uBieoeDOIJOEAFs86BxQVmLqBkZJVn3raJikhzoHJo pxe1lAFyeF5C7zjD1i5x =rG+d -----END PGP SIGNATURE-----