Plesk Mail not working amavis error

When sending email from a Plesk server, i get error

Aug 11 19:49:28 vmi274961 postfix/smtp[29276]: E413C3320265: to=[email protected], relay=none, delay=0.47, delays=0.47/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

This is beccause amavis service is not running. It is supposed to be run in port 10024

amavisd error

When i try to start amavis service, i get error

Aug 17 09:31:04 server.ishiply.com systemd[1]: Starting LSB: Starts amavisd-new mailfilter…
Aug 17 09:31:05 server.ishiply.com amavis[7771]: Starting amavisd: Problem in Amavis SQL base code: Can’t locate DBI.pm in @INC(you may need to install the DBI module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at (eval 100) line 19.


Aug 17 09:31:05 server.ishiply.com amavis[7771]: BEGIN failed–compilation aborted at (eval 100) line 19.
Aug 17 09:31:05 server.ishiply.com amavis[7771]: (failed).

This is becuase Perl DBI module was missing. On Ubuntu server, i found the package that provide this DBI.pm with command “apt-cache search DBI.pm”. To fix the error, install package libdbd-mysql-perl.

apt install -y libdbd-mysql-perl

After installing this, i try start amavis again. I got differnt error

[email protected]:~# systemctl status amavis.service
● amavis.service – LSB: Starts amavisd-new mailfilter
Loaded: loaded (/etc/init.d/amavis; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-08-17 09:59:37 SAST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 10597 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)

Aug 17 09:59:36 server.ishiply.com systemd[1]: Starting LSB: Starts amavisd-new mailfilter…
Aug 17 09:59:37 server.ishiply.com amavis[10603]: starting. /usr/sbin/amavisd-new at server.ishiply.com amavisd-new-2.10.1 (20141025), Unicode aware, LC_ALL=”C”, LANG=”en_US.UTF-8″
Aug 17 09:59:37 server.ishiply.com amavis[10597]: Starting amavisd: ERROR: MISSING REQUIRED ADDITIONAL MODULES:
Aug 17 09:59:37 server.ishiply.com amavis[10597]: DBD::mysql
Aug 17 09:59:37 server.ishiply.com amavis[10597]: DBD::mysql
Aug 17 09:59:37 server.ishiply.com amavis[10597]: (failed).
Aug 17 09:59:37 server.ishiply.com systemd[1]: amavis.service: Control process exited, code=exited status=1
Aug 17 09:59:37 server.ishiply.com systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
Aug 17 09:59:37 server.ishiply.com systemd[1]: amavis.service: Unit entered failed state.
Aug 17 09:59:37 server.ishiply.com systemd[1]: amavis.service: Failed with result ‘exit-code’.
[email protected]:~#

To find package that provide DBD::mysql, i used command

apt-cache search DBD::mysql

To fix, install the package

apt install -y libdbd-mysql-perl

I am able to start amavis service with command

systemctl start amavis.service

In Plesk > Extensions > Plesk Email Security now shows Amavis, Postfix and Dovecot running properly.

Plesk Mail Security Extension

Leave a Comment

Your email address will not be published. Required fields are marked *

Hire a server Expert to resolve the issue Now.

Hire a server Expert to resolve the issue Now.

Resolve this issue in just 5$ from https://serverexpert.io

 

You have Successfully Subscribed!

Open chat