1

Topic: Mail server not working after yum update

==== 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.6
- Linux/BSD distribution name and version: centos 6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): ldap
- Web server (Apache or Nginx):apache
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====
Apr  4 04:24:01 mailer roundcube: <5estdqht> DB Error: [1017] Can't find file: './roundcubemail/session.frm' (errno: 13) (SQL Query: SELECT `vars`, `ip`, `changed`, now() AS ts FROM `session` WHERE `sess_id` = '5estdqht7lo4fjejainqshrej0') in /var/www/roundcubemail-1.2.1/program/lib/Roundcube/rcube_db.php on line 539 (POST /mail/?_task=mail&_action=refresh)
Apr  4 04:24:01 mailer roundcube: <5estdqht> DB Error: [1017] Can't find file: './roundcubemail/session.frm' (errno: 13) (POST /mail/?_task=mail&_action=refresh)
Apr  4 04:24:01 mailer roundcube: <5estdqht> DB Error: [1017] Can't find file: './roundcubemail/session.frm' (errno: 13) (SQL Query: INSERT INTO `session` (`sess_id`, `vars`, `ip`, `created`, `changed`) VALUES ('5estdqht7lo4fjejainqshrej0', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9HQiI7', '203.23.20.118', now(), now())) in /var/www/roundcubemail-1.2.1/program/lib/Roundcube/rcube_db.php on line 539 (POST /mail/?_task=mail&_action=refresh)
Apr  4 04:24:02 mailer postfix/cleanup[21876]: 7C7F841C0FD: message-id=<11DQQ.5E6ZVWCS2F.20170404042356947@edm.qthotels.com.au>
Apr  4 04:24:02 mailer postfix/qmgr[21394]: 7C7F841C0FD: from=<bo-2KYK-11DQQ-6ZVWCS-C0BLE@edm.qthotels.com.au>, size=136320, nrcpt=1 (queue active)
Apr  4 04:24:03 mailer postfix/smtpd[21873]: disconnect from unknown[94.143.106.85]
Apr  4 04:24:03 mailer amavis[22002]: (22002-11) (!!)TROUBLE in check_mail: gen_mail_id FAILED: sql exec: err=1017, HY000, DBD::mysql::st execute failed: Can't find file: './amavisd/maddr.frm' (errno: 13) at (eval 113) line 172.
Apr  4 04:24:03 mailer amavis[22002]: (22002-11) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20170404T042402-22002-k6CzSkjQ
Apr  4 04:24:03 mailer postfix/smtp[21999]: 7C7F841C0FD: to=<as@xxxxxx.com.au>, relay=127.0.0.1[127.0.0.1]:10026, delay=4.3, delays=3.5/0/0/0.82, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=22002-11, gen_mail_id FAILED: sql exec: err=1017, HY000, DBD::mysql::st execute failed: Can't find file: './amavisd/maddr.frm' (errno: 13) at (eval 113) line 172. (in reply to end of DATA command))

hello

hope someone can help with this issue as i am at my wits end!!

i carelessly performed a yum update on my mailserver (was in the wrong server) and this broke everything.
thinking it may have to do with some iredmail updates that were not fully implemented, i proceeded to comple the iredmail update for the latest version.

the log above is typical any attempted mail and possible roundcube logins

i have gone down many dry creek beds looking for any hint of a solution but i have not got very far.

it could be to do with file permissions possibly, but not sure.

any suggestions?

by the way, when i attempt to login to roundcube, it says DATABASE ERROR: CONNECTION FAILED!
i have not attempted to update roundcube yet, but everything else has been updated

----

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

2

Re: Mail server not working after yum update

Seems MySQL databases were damaged. Try to run mysql repair command to fix it.
FYI: https://dev.mysql.com/doc/refman/5.7/en … table.html

3 (edited by raystrach 2017-04-06 15:02:40)

Re: Mail server not working after yum update

ZhangHuangbin wrote:

Seems MySQL databases were damaged. Try to run mysql repair command to fix it.
FYI: https://dev.mysql.com/doc/refman/5.7/en … table.html

thanks for the tip zhang.

although it took many hours and although it would not directly repair using the commands quoted here, i discovered that the problem was that when the yum update was performed, it updated the mysql module to a new version.

after ensuring all the permissions in the database files and folders were fixed - i have no idea why they changed - i then ran the following command which apparently did the trick

mysqlcheck -c  -u root -p --all-databases
mysqlcheck -r  -u root -p --all-databases

not sure if both were needed, but the second one definitely got things working after

service mysqld restart

4

Re: Mail server not working after yum update

Thanks for sharing. smile