Bug #154
Error Connecting to New Virtualized Mail Server
Added by Daniel Curtis over 11 years ago.
Updated almost 10 years ago.
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.
The problem kept happening, so I consulted the logfiles /var/log/syslog and /var/log/mail.err to find the following:
...
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
...
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
The solution was actually a few things:
- Install
dovecot-sieve
- Change postfix database location from
127.0.0.1
to localhost
- Change amavis database location from
127.0.0.1
to localhost
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'] );
- Project changed from 31 to GNU/Linux Administration
- Category set to Mail Server
- Private changed from Yes to No
Also available in: Atom
PDF