0
Mysql config personal server.
I'm working on a personal mail server, following this guide: Digital Ocean -Postfix/Dovecot/Mysql - Setup.
The thing is, that i want to config a user(mine this time), as 'normal'. This means without any additional permession. To accomplish that i'm working on a DB with root
user which i use to "grant/drop" permissions as needed.
- My 'user' have only
SELECT
permissions on my personalDB-email
. - I reviewed the config files and logs, but i can't find the error or what i'm doing wrong.
root
user have not outgoing email, that means he is not included on any database table, for security reasons.
The following log
is dumping trough tail
on a server loop-log maked by hand:
/var/log/mail.log:
dovecot: auth-worker(5529): Error: mysql(127.0.0.1): Connect failed to database (my-db): Access denied for user 'my_user'@'localhost' (using password: YES) - waiting for 125 seconds before retry.
dovecot: auth: Error: auth worker: Aborted PASSL request for root@correo.my-fqdn-server.something: Lookup timed out.
dovecot: lmtp(root@correo.my-fqdn-server.something): Error: user root@correo.fqdn-server.something: Auth USER lookup failed.
dovecot: auth-worker(5529): Error: mysql: Query timed out (no free connections for 60 secs): SELECT email as user, password FROM virtual_users WHERE email = 'root@correo.my-fqdn-server.something';
auth-worker(5529): Error: sql(root@correo.my-fqdn-server.net): Password query failed: Not connected to database.
/var/log/mysql/error.log
2016-11-04T08:38:38.500948Z 2552 [Note] Access denied for user 'my_user'@'localhost' (using password: YES).
So i undertand that the configuration on the server side, possibly on dovecot or postfix, files point a connection to the DB-email
trought root
but i want that it will be a my-user
.
- I reviwed the password and grant permisssions.
Any help will be apreciated.
note: this question was writed on "stack overflow" page and moved here acordingly to the nature of its own(about configuration) instead software develpment!(original question)
I think this post have no future!. Any way, i started it, and i will review it to try to solve on my own!. I found some
– Hell0 – 2016-11-05T09:31:44.010stack overflow
refference about theusage
statement onmysql GRANT
function. http://stackoverflow.com/questions/2126225/why-is-a-grant-usage-created-the-first-time-i-grant-a-user-privileges. It's about 'no-privileges' feature for a user on a database.I don't undertand if that privilege is causing my problem or not. Because i'm confering a specific 'state' to an user. These means that im 'granting'
SELECT
privilege to that user, but that user haveUSAGE
as well. What does it means?. Is it a conflict ? I should 'DROP' the user and 'start' again? – Hell0 – 2016-11-05T09:34:23.367Have you checked the MySQL logs for details why authentication failed? Try granting access not only for
127.0.0.1
, but also for::1
(which is localhost for IPv6, although Dovecot seems to connect on IPv4 following the logs). Did you try to connect manually throughmysql -u my-user -p -h 127.0.0.1
? – Jens Erat – 2016-11-05T16:06:30.807I checked the login, and i should try that about IPv6, but i think that those have no meaning in my system because all configs (Isp/ifconfig on cliente and server, point to IPv4 addr.). It is possible that the problem comes from a wrong "mbox" configuration? I mean postfix expect a maildir type, and i haven't constructed anything. I was thinking that the client do that. – Hell0 – 2016-11-07T17:12:50.470
On the server side, i won't give to root acces to any mail feature, because from an admin point of view that 'have no sense'. I can understand an internal mail delivery -obsolete if use the apropiate log system!, but anything beyond that. – Hell0 – 2016-11-07T17:29:08.210
Now i remember a valid mail sending using telnet. I checked the path on the server and i saw that:
cur dovecot.index.cache dovecot.index.log dovecot-uidlist dovecot-uidvalidity dovecot-uidvalidity.580e5032 new tmp
. It is possible that telnet do the work when the email was sended possitively? – Hell0 – 2016-11-07T17:41:37.067