1

Topic: Can't send mails after update 0.8.0/0.8.1, but done not the right way

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
==== ==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
====

iRedMail-0.8.0 updated to iRedMail-0.8.1 but not the right way.
MySQL backed, CentOS 6.2 x64.

How I think I should do the update:
1. Fallow the update link + MySQL backend part
2. Then download and apply iRedMail-0.8.1 bug fix release with config file form v. 0.8.0 ( apply it two times...)

How it should be done the right way ( I found it too late sad ).

Now in /var/log/mail I can see that postfix can not connect to mysql, but can not figure it out where to fix these permissions:
Jun 16 14:36:59 mail postfix/smtpd[2459]: connect from unknown[192.168.100.2]
Jun 16 14:37:03 mail postfix/smtpd[2465]: connect from unknown[192.168.100.2]
Jun 16 14:37:07 mail postfix/smtpd[2459]: disconnect from unknown[192.168.100.2]
Jun 16 14:38:18 mail postfix/qmgr[2289]: CD695A83B7: from=<admin@mail.net>, size=11140, nrcpt=2 (queue active)
Jun 16 14:38:18 mail postfix/qmgr[2289]: 94888A8441: from=<support@mail.net>, size=8769, nrcpt=2 (queue active)
Jun 16 14:38:18 mail amavis[2184]: (02184-06) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:38:18 mail amavis[2184]: (02184-06) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN29> line 13.
Jun 16 14:38:18 mail amavis[2184]: (02184-06) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T143818-02184
Jun 16 14:38:18 mail amavis[1885]: (01885-08) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:38:18 mail amavis[1885]: (01885-08) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN33> line 13.
Jun 16 14:38:18 mail amavis[1885]: (01885-08) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T143818-01885
Jun 16 14:38:18 mail postfix/smtp[2472]: CD695A83B7: to=<someone@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=2416, delays=2416/0.01/0/0.04, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02184-06, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN29> line 13. (in reply to end of DATA command))
Jun 16 14:38:18 mail amavis[2184]: (02184-07) (!!)TROUBLE in process_request: Can't create file /var/spool/amavisd/tmp/amavis-20120616T143818-02184/email.txt: File exists at /usr/sbin/amavisd line 5360, <GEN30> line 4.
Jun 16 14:38:18 mail amavis[2184]: (02184-07) (!)Requesting process rundown after fatal error
Jun 16 14:38:18 mail postfix/smtp[2472]: 94888A8441: to=<admin@mail.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=2392, delays=2391/0.1/0/0, dsn=4.3.2, status=deferred (host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to MAIL FROM command))
Jun 16 14:38:18 mail amavis[2478]: (02478-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:38:18 mail amavis[2478]: (02478-01) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN19> line 13.
Jun 16 14:38:18 mail amavis[2478]: (02478-01) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T143818-02478
Jun 16 14:38:18 mail postfix/smtp[2472]: 94888A8441: to=<someone@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=2392, delays=2391/0.14/0.08/0.05, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02478-01, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN19> line 13. (in reply to end of DATA command))
Jun 16 14:38:19 mail postfix/smtp[2473]: CD695A83B7: to=<support@mail.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=2416, delays=2416/0.02/0/0.05, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01885-08, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN33> line 13. (in reply to end of DATA command))
Jun 16 14:40:03 mail postfix/scache[2477]: statistics: start interval Jun 16 14:38:18
Jun 16 14:40:03 mail postfix/scache[2477]: statistics: domain lookup hits=0 miss=1 success=0%
Jun 16 14:40:03 mail postfix/scache[2477]: statistics: address lookup hits=0 miss=1 success=0%
Jun 16 14:40:03 mail postfix/scache[2477]: statistics: max simultaneous domains=1 addresses=1 connection=1
Jun 16 14:42:07 mail postfix/smtpd[2465]: disconnect from unknown[192.168.100.2]
Jun 16 14:43:18 mail postfix/qmgr[2289]: 25D0CA8443: from=<someone@gmail.com>, size=3120, nrcpt=2 (queue active)
Jun 16 14:43:18 mail postfix/qmgr[2289]: 9F502A8457: from=<support@mail.net>, size=551, nrcpt=2 (queue active)
Jun 16 14:43:18 mail amavis[1885]: (01885-09) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:43:18 mail amavis[1885]: (01885-09) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN35> line 34.
Jun 16 14:43:18 mail amavis[1885]: (01885-09) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T144318-01885
Jun 16 14:43:18 mail amavis[2478]: (02478-02) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:43:18 mail amavis[2478]: (02478-02) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN21> line 34.
Jun 16 14:43:18 mail amavis[2478]: (02478-02) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T144318-02478
Jun 16 14:43:19 mail postfix/smtp[2505]: 25D0CA8443: to=<admin@mail.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=1500, delays=1500/0.02/0/0.04, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01885-09, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN35> line 34. (in reply to end of DATA command))
Jun 16 14:43:19 mail amavis[1885]: (01885-10) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:43:19 mail amavis[1885]: (01885-10) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN37> line 14.
Jun 16 14:43:19 mail amavis[1885]: (01885-10) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T144319-01885
Jun 16 14:43:19 mail postfix/smtp[2505]: 9F502A8457: to=<admin@mail.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=957, delays=956/0.5/0.01/0.04, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01885-10, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN37> line 14. (in reply to end of DATA command))
Jun 16 14:43:19 mail amavis[2478]: (02478-03) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)
Jun 16 14:43:19 mail amavis[2478]: (02478-03) (!!)TROUBLE in check_mail: sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN23> line 14.
Jun 16 14:43:19 mail amavis[2478]: (02478-03) (!)PRESERVING EVIDENCE in /var/spool/amavisd/tmp/amavis-20120616T144319-02478
Jun 16 14:43:19 mail postfix/smtp[2505]: 9F502A8457: to=<someone@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=957, delays=956/0.59/0/0.04, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02478-03, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN23> line 14. (in reply to end of DATA command))
Jun 16 14:43:19 mail postfix/smtp[2507]: 25D0CA8443: to=<support@mail.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=1500, delays=1500/0.03/0/0.04, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02478-02, sql-enter FAILED: connect_to_sql: unable to connect to any dataset at (eval 88) line 241, <GEN21> line 34. (in reply to end of DATA command))
Jun 16 14:45:04 mail postfix/scache[2511]: statistics: start interval Jun 16 14:43:19
Jun 16 14:45:04 mail postfix/scache[2511]: statistics: domain lookup hits=0 miss=1 success=0%
Jun 16 14:45:04 mail postfix/scache[2511]: statistics: address lookup hits=0 miss=1 success=0%
Jun 16 14:45:04 mail postfix/scache[2511]: statistics: max simultaneous domains=1 addresses=1 connection=1
Jun 16 14:45:27 mail postfix/anvil[2461]: statistics: max connection rate 2/60s for (smtp:192.168.100.2) at Jun 16 14:37:03
Jun 16 14:45:27 mail postfix/anvil[2461]: statistics: max connection count 2 for (smtp:192.168.100.2) at Jun 16 14:37:03
Jun 16 14:45:27 mail postfix/anvil[2461]: statistics: max cache size 1 at Jun 16 14:36:59
Jun 16 14:46:59 mail postfix/smtpd[2529]: connect from unknown[192.168.100.2]
Jun 16 14:46:59 mail postfix/smtpd[2531]: connect from unknown[192.168.100.2]
Jun 16 14:47:00 mail postfix/smtpd[2531]: disconnect from unknown[192.168.100.2]
Jun 16 14:47:01 mail postfix/smtpd[2529]: warning: network_biopair_interop: error reading 5 bytes from the network: Connection reset by peer
Jun 16 14:47:01 mail postfix/smtpd[2529]: disconnect from unknown[192.168.100.2]

Any advice is welcome!
Thank you.

----

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

2

Re: Can't send mails after update 0.8.0/0.8.1, but done not the right way

Please update below files to use correct SQL username/password:

- /etc/postfix/mysql/*.cf
- /etc/dovecot/*.conf
- /etc/amavisd.conf or /etc/amavisd/amavisd.conf (Search 'storage_sql_dsn')
- /var/www/roundcubemail/config/db.inc.php
- /etc/policyd.conf and/or /etc/policyd_sender_throttle.conf (Search 'SQL')

First you should verify correct SQL username/password with MySQL command line, then update above config files.