Iredmail / Postfix : connect to 127.0.0.1[127.0.0.1]:10026: Connection refused

Root Cause

This problem is caused by the Amavis service experiencing problems, port 10026 cannot be accessed by Postfix as a content-filtering mail server. However, it can be seen that the root of the problem is not in Amavis itself, if we look at the Amavis log there is an error in the Spamassassin service which causes Amavis not to run normally, the error in Spamassassin caused by a configuration file that is corrupt or invalid.

Solution

To be able to solve problems with the Spamassassin service, you can reinstall the service using the following method which is a way to delete the Spamassassin service.

$ apt remove spamassassin
$ apt purge spamassassin
$ apt autoremove

Next, we can install the spamassassin service again using the following command.

$ apt install spamassassin

Then we can restart all services on the mail server.

$ systemctl restart clamav-daemon postfix spamassassin dovecot amavis