Linode Forum
https://forum.linode.com/

Dovecot: Authorization Query Problem
https://forum.linode.com/viewtopic.php?f=11&t=10788
Page 1 of 1

Author:  chernevik [ Sun Jan 19, 2014 2:03 pm ]
Post subject:  Dovecot: Authorization Query Problem

THIS IS SOLVED. I'm leaving my comments in case someone else finds them helpful.

I'm setting up a mailserver, per the (excellent) Linode Library Postfix/Dovecot/MySQL piece.

The server seems to be receiving mail for admin@hammeringbits.net.

BUT I cannot log in to the server to get mail with Thunderbird.

I see in the logs that the query for the authorization is failing because there is no entry where email='admin'. Unsurprising, as the insertion for this user creates email to 'admin@hammeringbits.net'. (I saw this after setting auth_debug_passwords=yes in the Dovecot main configuration.) (An experiment entering the user with email at 'admin' fails, as emails _sent_ to the user are bounced as no such user.)

At a high level it seems the fix is to amend Dovecot's authorization query to search for 'admin@hammeringbits.net'. But I have no idea how to change the Dovecot configuration to achieve that.

Any help would be appreciated.

Author:  chernevik [ Sun Jan 19, 2014 2:32 pm ]
Post subject:  Re: Dovecot: Authorization Query Problem

There seems to be a problem getting the domain name to Dovecot's authorization query.

It could be be a configuration problem at Thunderbird. The Dovecot search query for password uses %u, which should be the user@domainname sent to the server. Perhaps Thunderbird isn't sending the domain name as part of the user name? But setting user name to admin@hammeringbits.net, causes Thunderbird asks for the password for 'admin@hammeringbits.net@hammeringbits.net'. That isn't the fix.

When I change the password_query to << WHERE email = '%u@%d', the log shows a search for 'admin@' -- as if there is no value for %d. Which should be the domain value. (And no that query shouldn't work, %u ought to be name and domain name.)

If I had to guess, I'd say Dovecot somehow is missing or dropping the domain name. Maybe in the handoff from Postfix? How can I test that theory, and / or fix that if it is the problem?

Author:  chernevik [ Sun Jan 19, 2014 2:50 pm ]
Post subject:  Re: Dovecot: Authorization Query Problem

Update: The command << doveadm user admin@hammeringbits.net >> returns the expected output.

Author:  chernevik [ Sun Jan 19, 2014 3:16 pm ]
Post subject:  Re: Dovecot: Authorization Query Problem

SOLVED. The answer was indeed setting username to admin@hammeringbits.net, despite the message asking for the password for admin@hammeringbits.net@hammeringbits.net.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/