Plesk courier-imap imapd on port 143 fails

After Plesk upgrade to 9.5.4, imapd on port 143 did not come up.

On checking the maillog, it was complaining about:

imapd: Invalid -maxprocsarg option.
imapd-ssl: Invalid -maxprocsarg option.

I noticed /etc/courier-imap/imapd had both the below lines commented:


Once I uncommented those values, I was able to get the imap listener up upon a `service courier-imap restart`.

chroot ftp user outside plesk

To chroot ftp user outside of plesk, add the user belonging to psacln group.

usemod -g psacln <username>

Converting Shared to Exclusive IP for Plesk Domain

First go into "Clients", select the corresponding client IP Addresses and assign the additional IP address.

Then go into "Domains", select the domain that should be converted to exclusive IP and modify the "Web Host Settings" and assign it the new IP.

Logfile '/var/log/kav/5.5/kav4mailservers/avstats.log' does not exist

To resolve kluser cron error on missing log file:

Logfile '/var/log/kav/5.5/kav4mailservers/avstats.log' does not exist

Modify kluser cron as below via `crontab -e -u kluser` appending "/bin/touch /var/log/kav/5.5/kav4mailservers/avstats.log;":

/bin/touch /var/log/kav/5.5/kav4mailservers/avstats.log; /opt/kav/5.5/kav4mailservers/bin/ -d -sd=/opt/kav/5.5/kav4mailservers/proc_avstat /var/log/kav/5.5/kav4mailservers/avstats.log

Plesk and SPF records

The Plesk DNS zone template for TXT record does not include the servers hostname by default. If the host IP is different from the domains being hosted, may want to update the default template as below:

<domain>. TXT v=spf1 +a +mx a:host.domain.tld -all

Plesk imap connections limit

By default Plesk IMAP maximum connections per IP is set to 4. If you are using an email client that checks multiple mailboxes, this limit is easily reached.

To increase the limit, edit "/etc/courier-imap/imapd":


Plesk email users and passwords

Below is sql, if you ever need to test out your users email accounts on plesk server:

mysql> use psa
mysql> select concat(mail_name,"@",name) as email_address, accounts.password from mail left join domains on left join accounts on;

drweb antivirus update cron output

A cron is run every 30 minutes to check on virus database updates via /etc/cron.d/drweb-update, which cause a slew of emails addressed to drweb and filling up mail queue, since drweb does not have a maildir.

To resolve, direct the output to /dev/null or to a log file instead... if you need to keep a watch on the updates.

Edit /etc/cron.d/drweb-update redirecting the output to a log file:

*/30 * * * * drweb /opt/drweb/ >>/tmp/drweb_update.log

If you still want to deliver the output, this can be done by directing drweb mail to root via "/var/drweb/.qmail" or "/var/qmail/alias/.qmail-drweb" with "&root".

cannot create temporary file - (13) Permission denied

This is dues to bug in the default installation of qmail in handling local mails... such as mails to root@localhost where the qmail-local binary is not set with the right owner and permissions, as such mails are not able to be written to the spool located at "/usr/local/psa/handlers/spool".

The error in "/usr/local/psa/var/log/maillog" looks like below:

qmail-local-handlers[......]: cannot create temporary file - (13) Permission denied

To resolve, change the owner and permission of /var/qmail/bin/qmail-local to reflect the same as qmail-remote.

cd /var/qmail/bin
chown mhandlers-user:popuser qmail-local
chmod g+s,g-r,o-r qmail-local

Restart qmail:

/etc/init.d/qmail restart

Bulk update DNS TTL for all Plesk domains

This is useful when migrating servers and you want to reduce the DNS time to live for all domains.

Change the TTL on all domains to 5 mins (300 seconds) in the psa database.

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql> UPDATE `dns_zone` SET `ttl` = '300', `ttl_unit` = '60' WHERE `id` >1;
mysql> quit

Then update the zone files via:

# mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh

Verify with:

$ dig @nameserver domain.tld soa

Syndicate content