Posts

Ispconfig not processing job queue – spamfilter_policy error

Suddenly some of my slave servers stopped processing the job queue. Ispconfig version 3.2.9. Investigating the log files.

/var/log/ispconfig/cron.log shows:

PHP Fatal error:  Uncaught mysqli_sql_exception: Data truncated for column 'warnvirusrecip' at row 1 in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:302

See this discussion: https://forum.howtoforge.com/threads/uncaught-mysqli_sql_exception-data-truncated-for-column-warnvirusrecip-at-row-1.90116/

This is how I solved it. On the master server:

mysqldump -uroot -p --add-drop-table dbispconfig spamfilter_policy > spamfilter_policy.sql

Then copy the spamfilter_policy.sql to each slave server having problems processing the queue and do:

mysql -uroot -p dbispconfig < spamfilter_policy.sql

Ispconfig3 certbot is not renewing certificates (Ubuntu 20)

When creating a new site, a valid certificate was issued but when expiring they where never renewed. Investigating /etc/letsencrypt directories was missing the usual subfolders, like live for example.

It turned out the server had both acme.sh and certbot installed. The solution was to remove certbot. Investigate if the directory /root/.acme.sh exists and it’s contents.

apt remove certbot
ispconfig_update.sh --force

Then in Ispconfig go to Tools -> Sync, select Web sites and the server you just removed.

ISPConfig3 localized ‘Welcome to your new email account’ mail not working [SOLUTION]

I made a copy of the file welcome_email_en.txt from /usr/local/ispconfig/server/conf/mail to /usr/local/ispconfig/server/conf-custom/mail and named it welcome_email_se.txt and translated the content of the file, as I wanted my clients to be greeted to their new email account in Swedish. However, the client was still receiving the welcome email in English.

It turned out that the configuration file for ISPConfig has a parameter for language which controls what email templates to use. I thought it would use the country settings from the Client but it doesn’t.

In /usr/local/ispconfig/server/lib check if the file config.inc.local.php exists. If it doesn’t, create one (here is a template for it).

Add the line:

$conf['language'] = 'se';

By using config.inc.local.php and not directly editing config.inc.php you are making sure it doesn’t get overwritten in the next ISPConfig3 update.

In a multiserver setup (master/slaves) this must be done on all the slaves as the ‘Welcome to your new email account’-email is being generated on the server where the new mailbox is located.

Ispconfig 3.0 to 3.1 update issue – PHP-FPM and SSL problems

After updating a multi server installation of Ispconfig3 problems occured when editing existing or adding new websites on one of the servers.

  • If the site had SSL enabled the apache2 vhosts file for the site (located in /etc/apache2/sites-availible) would get empty values for SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile fields, causing it to revert to old configuration or not load the site at all. At some point apache2 wouldn’t reload at all so to get it upp the site had to be disabled by removing /etc/apache2/sites-enabled/100-sitename.vhost file.
  • If the site was running under PHP-FPM the site would report Internal server error 501 caused by the socket file /var/lib/php5-fpm/webXXX.sock was owned by root and not by the web user. This in turned was caused by the fields listen.owner and listen.group in webXXX.conf (for PHP-FPM) was empty.

Since this was a multi server installation and this problem only occured on one server they could be compared. It turned out that the problem was caused in the directory /usr/local/ispconfig/server/plugins-enabled. The files in this directory should be symbolic links to the corresponding files in /usr/local/ispconfig/server/plugins-available, but after a move of the Ispconfig3 installation from an older server, these links had become real files instead of symbolic links.

This meant that the files in /usr/local/ispconfig/server/plugins-enabled was still Ispconfig 3.0 files while the ones in /usr/local/ispconfig/server/plugins-available was Ispconfig 3.1. To resolve the problem, to be on the safe side, make a backup of /usr/local/ispconfig/server/plugins-enabled and then run:

cd /usr/local/ispconfig/server/plugins-enabled
ln -s -f /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php apache2_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php apps_vhost_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/aps_plugin.inc.php aps_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php bind_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php cron_jailkit_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/cron_plugin.inc.php cron_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/firewall_plugin.inc.php firewall_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/ftpuser_base_plugin.inc.php ftpuser_base_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/getmail_plugin.inc.php getmail_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/maildrop_plugin.inc.php maildrop_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mailman_plugin.inc.php mailman_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mail_plugin_dkim.inc.php mail_plugin_dkim.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mail_plugin.inc.php mail_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php mysql_clientdb_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/network_settings_plugin.inc.php network_settings_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/postfix_filter_plugin.inc.php postfix_filter_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/postfix_server_plugin.inc.php postfix_server_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php shelluser_base_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/shelluser_jailkit_plugin.inc.php shelluser_jailkit_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/software_update_plugin.inc.php software_update_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/webserver_plugin.inc.php webserver_plugin.inc.php

Verify with ls -l /usr/local/ispconfig/server/plugins-enabled that all your files are symbolic links.

 

FTP not working in passive mode – proftpd, iptables and ISPconfig

If you are using proftpd FTP server together with iptables firewall, which is the case if you for example are using ISPconfig, you will probably have problems using FTP against your server in passive mode. The problem is that the iptables firewall will not allow the incoming connections in passive mode.

The solution is to configure proftpd to use a small, defined range of incoming ports and open iptables for this range.

Read more