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'] );