1

Topic: Multiple errors (internal server error and wrong password)

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5.1
- Linux/BSD distribution name and version: Debian GNU/Linux 8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hi,

after setting a new password for:

'root'@'127.0.0.1'
'root'@'::1'
'root'@'mail'

in MySQL, iredmail stopped working and I am not sure how the two things are related. Symptoms:
- No user can login from their smartphones (they are asked to re-type the password even if it was right).
- SoGO returns "Wrong username or password."
- ireadmin returns "internal server error" in the top left corner.

dovecot.log is full of lines like this one:

Aug 08 09:02:41 auth-worker(2929): Error: mysql(127.0.0.1): Connect failed to database (vmail): Access denied for user 'vmail'@'127.0.0.1' (using password: YES) - waiting for 25 seconds before retry

in mail.log there is this group of warnings repeated every 2 seconds:

Aug  7 16:51:02 mail postfix/cleanup[1080]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "sogo@mail.thetheatretimes.com"
Aug  7 16:51:02 mail postfix/cleanup[1080]: warning: 1B1F621F80130: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug  7 16:51:02 mail postfix/pickup[32645]: warning: maildrop/2FED921F800EF: error writing 1B1F621F80130: queue file write error
Aug  7 16:51:03 mail postfix/pickup[32645]: 1B7A921F80130: uid=999 from=<sogo>

sogo.log is full of:

Aug 08 03:44:46 sogod [2561]: [ERROR] <0x0x7fedd4229760[SQLSource]> failed to acquire channel for URL: mysql://sogo:or1tHNP3RZN1nQ3KNHWbBT4ihSXRFh@127.0.0.1:3306/sogo/users

uwsgi/app/iredamin.log shows:

OperationalError: (1045, "Access denied for user 'iredadmin'@'127.0.0.1' (using password: YES)")

I sent a few test emails from other mailboxes and the delivery does not seem to fail - although nobody can log in to check if they arrived.

WTH is going on?

Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Multiple errors (internal server error and wrong password)

Obviously, you changed password for SQL user 'vmail'.

3 (edited by Rashef 2016-08-08 18:57:45)

Re: Multiple errors (internal server error and wrong password)

Hi,

thanks for your reply. That was my first thought, but I went back checking the history of my session and this is the sequence of commands I typed (passwords are redacted):

SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('*********);
SET PASSWORD FOR 'root'@'::1' = PASSWORD('*********');
SET PASSWORD FOR 'root'@'mail' = PASSWORD('*********');

Nothing more, and no one else logged in.

Anyway, how can I reset the vmail password again and where should it be stored to ensure that iredmail works fine?

Thanks again.

4

Re: Multiple errors (internal server error and wrong password)

Find the original vmail password from either iRedMail-0.9.5-1/iRedMail.tips file, or /etc/postfix/mysql/*.cf. Then reset its password to the original one with sql command:

mysql> USE mysql;
mysql> UPDATE user SET password=PASSWORD('<the_password>') WHERE User='vmail';

5 (edited by Rashef 2016-08-08 22:18:08)

Re: Multiple errors (internal server error and wrong password)

Hi,

done and done. After reboot, the problem persists...

Any hint on how to track down the root cause? I am a bit surprised that the "Internal Server Error" returned by iredadmin does not leave any trace anywhere...

UPDATE: and this error is still present in dovecot.log

auth-worker(1733): Error: mysql(127.0.0.1): Connect failed to database (vmail): Access denied for user 'vmail'@'127.0.0.1' (using password: YES)

6

Re: Multiple errors (internal server error and wrong password)

Rashef wrote:

auth-worker(1733): Error: mysql(127.0.0.1): Connect failed to database (vmail): Access denied for user 'vmail'@'127.0.0.1' (using password: YES)

Reset it again with command below (with `Host` column):

mysql> USE mysql;
mysql> UPDATE user SET password=PASSWORD('<the_password>') WHERE User='vmail' AND Host='127.0.0.1';

Also, please show me output of sql commands below:

mysql> USE mysql;
mysql> SELECT Host FROM user WHERE User='vmail';

7 (edited by Rashef 2016-08-08 22:30:57)

Re: Multiple errors (internal server error and wrong password)

Hi,

I found the problem. It was the instruction

skip-name-resolve=1

in my my.cnf file. After commenting it out, everything went back to normal.

Thanks