Categories
Linux Plesk

Plesk Prelink Cron error

I found that we had been getting this error every morning since updating the Plesk server to 9.3 :

Cron <root@plesk3> run-parts /etc/cron.daily
/etc/cron.daily/prelink:
/etc/cron.daily/prelink: line 45: /var/log/prelink/prelink.log: No such file or directory
/etc/cron.daily/prelink: line 46: /var/log/prelink/prelink.log: No such file or directory
/etc/cron.daily/prelink: line 47: /var/log/prelink/prelink.log: No such file or directory

The odd thing is that the /var/log/prelink/ folder does not seem to have been created during the upgrade process, and the cron cannot create the folder automatically. Simple fix – SSH into your server and create the folder manually

mkdir /var/log/prelink

Let me know in the comments if this has helped you out…

Categories
Plesk

Quick command : Top 25 Mailboxes by Size

Description : This command will email (or display in terminal) the top 25 mailboxes, ordered by size. Strangely – Plesk doesn’t seem to have any kind of Mailbox Size report, and will only show you the domain mailboxes combined.

Simply SSH into your Plesk server and run the following :

cd /var/qmail/mailnames
du -hs --block-size=1024K */* | sort -nr | head -25 | mail -s 'Top 25 Mailboxes by Size' [email protected]

And if you wish to display on screen :

cd /var/qmail/mailnames
du -hs --block-size=1024K */* | sort -nr | head -25

The first script could be set up as a handy Cron job to send you a weekly / monthly report.

Categories
Linux Plesk

Plesk server – ‘www’ prefix not working

If you didn’t add the ‘www’ prefix at the time of setting up the domain, even adding it back in later doesn’t seem to work. This fault seems to be present within all current versions of Plesk up to my current version v9.2

To work around this problem, firstly – turn on the ‘www’ prefix again within the Plesk control panel.

Domains > yourdomain.com > Modify > WWW Prefix – Tick this box

The www prefix will still not work… to correct this, we need to re-build the Apache config after turning it back on:

/usr/local/psa/admin/sbin/websrvmng -v -a