Spike98
2017-Nov-28 18:08 UTC
How to make dovecot access a MySQL database with a certain domain?
I am trying to make a mail server with Postfix using the Dovecot software. At the time of wanting to access my server from a mail client, it does not let me access and see the logs of my server with the command: $ service dovecot status with the following error: dovecot: auth-worker(2769): Error: mysql(127.0.0.1): Connect failed to database (postfix): Access denied for user 'postfix'@'localhost' (using password: YES) - waiting for 125 seconds before retry From what I understand of this error is that it is trying to enter 'postfix' @ 'localhost' instead of the domain that I specify when I made the database that is mydomain.com How can you make dovecot go to MySQL with postfix at mydomain.com instead of localhost This is my Dovecot configuration /etc/dovecot/dovecot-sql.conf.ext driver=mysql default_pass_scheme=PLAIN-MD5 connect=host=127.0.0.1 dbname=postfix user=postfix password=postfix password_query=SELECT username,domain,password FROM usuarios WHERE username='%n' AND domain='%d' user_query=SELECT 1007 as uid, 1007 as gid, concat("maildir:/var/vmail",domain,'/',username,'/') as mail FROM usuarios WHERE username='%n' AND domain='%d' iterate_query=SELECT username,domain FROM usuarios
Roger Klorese
2017-Nov-28 18:12 UTC
How to make dovecot access a MySQL database with a certain domain?
Replace 127.0.0.1 with the domain name. On Tue, Nov 28, 2017 at 10:08 AM Spike98 <spike98 at protonmail.com> wrote:> I am trying to make a mail server with Postfix using the Dovecot software. > At the time of wanting to access my server from a mail client, it does not > let me access and see the logs of my server with the command: > > $ service dovecot status > with the following error: > > dovecot: auth-worker(2769): Error: mysql(127.0.0.1): Connect failed to > database (postfix): Access denied for user 'postfix'@'localhost' (using > password: YES) - waiting for 125 seconds before retry > > From what I understand of this error is that it is trying to enter > 'postfix' @ 'localhost' instead of the domain that I specify when I made > the database that is mydomain.com > > How can you make dovecot go to MySQL with postfix at mydomain.com instead of > localhost > > This is my Dovecot configuration > > /etc/dovecot/dovecot-sql.conf.ext > > driver=mysql > > default_pass_scheme=PLAIN-MD5 > > connect=host=127.0.0.1 dbname=postfix user=postfix password=postfix > > password_query=SELECT username,domain,password FROM usuarios WHERE > username='%n' AND domain='%d' > > user_query=SELECT 1007 as uid, 1007 as gid, > concat("maildir:/var/vmail",domain,'/',username,'/') as mail FROM usuarios > WHERE username='%n' AND domain='%d' > > iterate_query=SELECT username,domain FROM usuarios
Tobi
2017-Nov-28 19:06 UTC
How to make dovecot access a MySQL database with a certain domain?
The @localhost part is correct if you connecting to mysql at 127.0.0.1. It's the rdns of the connecting client.? Are you sure that the user postfix has access rights to postfix database? Can you connect on cli using something like mysql -upostfix -ppostfix postfix? ? Am 28. November 2017 19:08:12 MEZ schrieb Spike98 <spike98 at protonmail.com>:>I am trying to make a mail server with Postfix using the Dovecot >software. At the time of wanting to access my server from a mail >client, it does not let me access and see the logs of my server with >the command: > > $ service dovecot status >with the following error: > >dovecot: auth-worker(2769): Error: mysql(127.0.0.1): Connect failed to >database (postfix): Access denied for user 'postfix'@'localhost' (using >password: YES) - waiting for 125 seconds before retry > >From what I understand of this error is that it is trying to enter >'postfix' @ 'localhost' instead of the domain that I specify when I >made the database that is mydomain.com > >How can you make dovecot go to MySQL with postfix at mydomain.com instead >of localhost > >This is my Dovecot configuration > >/etc/dovecot/dovecot-sql.conf.ext > > driver=mysql > > default_pass_scheme=PLAIN-MD5 > > connect=host=127.0.0.1 dbname=postfix user=postfix password=postfix > >password_query=SELECT username,domain,password FROM usuarios WHERE >username='%n' AND domain='%d' > >user_query=SELECT 1007 as uid, 1007 as gid, >concat("maildir:/var/vmail",domain,'/',username,'/') as mail FROM >usuarios WHERE username='%n' AND domain='%d' > > iterate_query=SELECT username,domain FROM usuarios-- Diese Nachricht wurde von meinem Android-Ger?t mit K-9 Mail gesendet.