Bug #216

dovecot sql connection file parse error?

Added by Duane Hughes about 2 years ago. Updated 11 months ago.

Status:Closed Start date:12/11/2009
Priority:Low Due date:
Assignee:Natanael Copa % Done:

0%

Category:Aports
Target version:Alpine 2.2.0

Description

when attempting to connect to a postgresql database using dovecot-pgsql, i notice the following wierd error:

If my dovecot-sql.conf file is as follows:

driver = pgsql
connect = host=localhost dbname=postfix user=postfix password=********
default_pass_scheme = CRYPT
password_query = SELECT username, password FROM mailbox WHERE username = 'u%'
user_query = SELECT maildir AS home FROM mailbox WHERE username = 'u%'

Then when starting dovecot, i get:

Dec 11 22:56:38 auth(default): Error: Error in configuration file /etc/dovecot/dovecot-sql.conf line 6: Expecting '='
Dec 11 22:56:38 dovecot: Error: child 2162 (auth) returned error 89 (Fatal failure)
Dec 11 22:56:38 dovecot: Fatal: Auth process died too early - shutting down

There is no line 6 in the file.

however, if i adjust the config file to be as follows:

driver = pgsql
connect = host=localhost dbname=postfix user=postfix password=********
default_pass_scheme = CRYPT
password_query = SELECT username, password FROM mailbox WHERE username = 'u%'
user_query = SELECT maildir AS home FROM mailbox WHERE username = 'u%'

Then dovecot starts with no problem.

Possibly some sort of file parsing bug? From doing research, i think the syntax within my conf file is correct.

Thanks for looking into this!

History

Updated by Duane Hughes about 2 years ago

Apologies - i didn't show the file difference :(

If i adjust the config file as follows, then dovecot is able to parse the file and start with no problem:

driver = pgsql
connect = host=localhost dbname=postfix user=postfix password=********
password_query = SELECT username, password FROM mailbox WHERE username = 'u%'
user_query = SELECT maildir AS home FROM mailbox WHERE username = 'u%'
default_pass_scheme = CRYPT

The difference seems to be putting some line after the lines containing anything like '%u', as in the example above. From most examples I've seen on the net, the above configuration file is correct, including the use of single, not double quotes.

Updated by Natanael Copa about 2 years ago

Does it help with an empty line after?

Updated by Duane Hughes about 2 years ago

If you leave a blank line after the last line in my 1st example above, (the line that looks like user_query = SELECT maildir AS home FROM mailbox WHERE username = 'u%'), then it makes no difference. The only way seems to be by putting some other parameter below it, like i did with the "default_pass_scheme = CRYPT" entry.

Updated by Natanael Copa almost 2 years ago

  • Target version changed from Alpine 1.9 to Alpine 1.10.0

Updated by Natanael Copa almost 2 years ago

Do you think you could report this upstream to dovecot developers?

Thanks!

Updated by Natanael Copa almost 2 years ago

  • Priority changed from Normal to Low
  • Target version changed from Alpine 1.10.0 to Alpine 2.0.0

Updated by Natanael Copa over 1 year ago

  • Target version changed from Alpine 2.0.0 to Alpine 2.1.0

Updated by Natanael Copa over 1 year ago

  • Category set to Aports
  • Target version changed from Alpine 2.1.0 to Alpine 2.2.0

is this still an issue with dovecot-2.0.x?

Updated by Natanael Copa about 1 year ago

  • Status changed from New to Closed

im closing this. please re-open if its still an issue

thanks!

Updated by milocore milocore 11 months ago

nangel: Removed spam from milocore and locked user.

Also available in: Atom PDF