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 personal DB-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 stack overflow refference about the usage statement on mysql GRANT function. stackoverflow.com/questions/2126225/…. It's about 'no-privileges' feature for a user on a database. – Hell0 Nov 5 '16 at 9:31
  • 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 have USAGE as well. What does it means?. Is it a conflict ? I should 'DROP' the user and 'start' again? – Hell0 Nov 5 '16 at 9:34
  • Have 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 through mysql -u my-user -p -h 127.0.0.1? – Jens Erat Nov 5 '16 at 16:06
  • I 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 Nov 7 '16 at 17:12
  • 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 Nov 7 '16 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.