Hello
I am trying to use pam to authenticate dovecot again a mysql database.
In /etc/pam.d/dovecot i have:
auth optional pam_mysql.so host=localhost db=maildb user=mailro \
passwd=xxx table=users usercolumn=address passwdcolumn=passwd \
where="disabled is NULL and deleted = ''" crypt=1
account required pam_mysql.so host=localhost db=maildb user=mailro \
passwd=xxx table=users usercolumn=address passwdcolumn=passwd \
where="disabled is NULL and deleted = ''" crypt=1
I have the same file for smtp and it works ok.
However when i try to log in dovecot i get:
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: is
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: NULL
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: and
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: deleted
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: Jun 4 05:02:21 tx07
dovecot-auth: Unknown option: ''"
Jun 4 05:02:21 tx07 dovecot-auth: You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near '"disabled)' at line 1
I am running dovecot 0.99.14
Thanks,
Radu
Hello
I am trying to use pam to authenticate dovecot again a mysql database.
In /etc/pam.d/dovecot i have:
auth optional pam_mysql.so host=localhost db=maildb user=mailro \
passwd=xxx table=users usercolumn=address passwdcolumn=passwd \
where="disabled is NULL and deleted = ''" crypt=1
account required pam_mysql.so host=localhost db=maildb user=mailro \
passwd=xxx table=users usercolumn=address passwdcolumn=passwd \
where="disabled is NULL and deleted = ''" crypt=1
I have the same file for smtp and it works ok.
However when i try to log in dovecot i get:
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: is
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: NULL
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: and
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: deleted
Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: Jun 4 05:02:21 tx07
dovecot-auth: Unknown option: ''"
Jun 4 05:02:21 tx07 dovecot-auth: You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near '"disabled)' at line 1
I am running dovecot 0.99.14
Thanks,
Radu
radus at smartpost.ro wrote:> Hello > > I am trying to use pam to authenticate dovecot again a mysql database. > In /etc/pam.d/dovecot i have: > auth optional pam_mysql.so host=localhost db=maildb user=mailro \ > passwd=xxx table=users usercolumn=address passwdcolumn=passwd \ > where="disabled is NULL and deleted = ''" crypt=1 > account required pam_mysql.so host=localhost db=maildb user=mailro \ > passwd=xxx table=users usercolumn=address passwdcolumn=passwd \ > where="disabled is NULL and deleted = ''" crypt=1 > > I have the same file for smtp and it works ok. > > However when i try to log in dovecot i get: > Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: is > Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: NULL > Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: and > Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: deleted > Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: > Jun 4 05:02:21 tx07 dovecot-auth: Unknown option: ''" > Jun 4 05:02:21 tx07 dovecot-auth: You have an error in your SQL syntax. > Check the manual that corresponds to your MySQL server version for the > right syntax to use near '"disabled)' at line 1 > > I am running dovecot 0.99.14 > > Thanks, > Radu > >Hi Radu, Why not try using dovecot's built in MySQL auth? You can build full SQL queries in that. Regards Andrew -- Andrew Hutchings (A-Wing) Linux Guru - Netserve Consultants Ltd. - http://www.domaincity.co.uk/ Admin - North Wales Linux User Group - http://www.nwlug.org.uk/ BOFH excuse 364: Sand fleas eating the Internet cables