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 authdebugpasswords=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.

3 Replies

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?

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

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct