Hello, Maybe the semicolon <;> is missing at the end of each queries in /etc/mail/pgsql.conf
if not, could you share the relations of your database ? Olivier. On Tue, 27 Mar 2018 18:16:47 +0300 Denis <den...@mindall.org> wrote: > smtpd auth works from PGSQL since than. Thank you for answers. > > Right configs are below: > > $ cat /etc/mail/smptd.conf > ... > table alias db:/etc/mail/alias > table domains posgres:/etc/mail/pgsql.conf > table virtuals postgres:/etc/mail/pgsql.conf > table pass postgres:/etc/mail/pgsql.conf > table userinfo postgres:/etc/mail/pgsql.conf > ... > > $ cat /etc/mail/pgsql.conf > # PostgreSQL > conninfo host=127.0.0.1 dbname=maildatabase user=maildbuser > password=secret > query_alias SELECT dest FROM virtuals WHERE alias=$1 > query_domain SELECT domain FROM domains WHERE domain=$1 LIMIT 1 > query_credentials SELECT user, pass FROM users WHERE user=$1 AND > active='1' query_userinfo SELECT CONCAT (user, realm) AS user, uid, > gid FROM users WHERE user=$1 AND active='1' > > The database schema can be any, queries can be made by changing > table> names and columns in /etc/mail/pgsql.conf according to schema. > > --- > Denis > > On 3/27/2018 5:25 PM, Reio Remma wrote: > > On 27.03.18 16:58, Denis wrote: > >> query_alias SELECT CONCAT (alias, ' ', dest) AS alias FROM > >> maildatabase WHERE alias=$1 > >> query_domain SELECT domain FROM maildatabase WHERE domain=$1 > >> query_credentials SELECT user, pass FROM maildatabase WHERE > >> userid=$1 AND active=$1 > >> query_userinfo SELECT CONCAT (user, realm) AS user, uid, gid FROM > >> maildatabase WHERE user=$1 AND active='1' > >> > >> 5. The database schema is self written, I can share it if it was > >> necessary. > >> > >> --- > >> > >> What can be wrong? > >> > >> Denis > > > > I suspect query_credentials should also have active='1' instead of > > active=$1. > > > > Reio > > > > > -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org