Bug #154
Error Connecting to New Virtualized Mail Server
Description
I encountered a problem while migrating the physical in which I could not connect to the server using my mail client, Thunderbird. As the server is virtual and configured with a bare minimal OS there was no advanced logging facilities. So I installed rsyslog:
sudo apt-get install rsyslog
I found that Dovecot was not loading the mysql driver. So I looked to see if the package was installed:
dpkg -l dovecot-mysql
To find that the module was not installed, so I simply installed the package:
sudo apt-get install dovecot-mysql
This allowed normal connections to resume.
Updated by Daniel Curtis over 11 years ago
- /var/log/syslog
...
Aug 1 16:46:12 lxc-submail amavis3588: (03588-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Can't connect to MySQL server on '127.0.0.1' (111)
Aug 1 16:46:12 lxc-submail amavis3588: (03588-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 111) line 247.
Aug 1 16:46:12 lxc-submail amavis3588: (03588-01) (!)Requesting process rundown after fatal error
Aug 1 16:56:43 lxc-submail dovecot: lda: Fatal: Plugin 'sieve' not found from directory /usr/lib/dovecot/modules
Aug 1 17:01:14 lxc-submail postfix/trivial-rewrite4196: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Aug 1 17:01:14 lxc-submail postfix/trivial-rewrite4196: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
...
- /var/log/mail.err
The solution was actually a few things:Aug 1 16:55:04 lxc-submail amavis3859: (03859-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 111) line 247.
Aug 1 16:56:15 lxc-submail dovecot: lda: Fatal: Plugin 'sieve' not found from directory /usr/lib/dovecot/modules
- Install
dovecot-sieve
- Change postfix database location from
127.0.0.1
tolocalhost
- Change amavis database location from
127.0.0.1
tolocalhost
1. Install dovecot-sieve
¶
sudo apt-get install dovecot-sieve
2. Change postfix database location from 127.0.0.1
to localhost
¶
perl -i -pe 's/hosts = 127.0.0.1$/hosts = localhost\n/' /etc/postfix/mysql-virtual_*.cf /etc/init.d/postfix reload
3. Change amavis database location from 127.0.0.1
to localhost
¶
/etc/amavis/conf.d/50-user
@lookup_sql_dsn =
( ['DBI:mysql:database=dbispconfig;host=localhost;port=3306', 'ispconfig', 'xxxxxxxx'] );
Updated by Daniel Curtis almost 10 years ago
- Project changed from 31 to GNU/Linux Administration
- Category set to Mail Server
- Private changed from Yes to No