Plesk stores email messages in the
/var/qmail/mailnames/ directory. The partition where
/var is located does not have enough disc space. How to change location of the directory with mailboxes?
PLESK_MAILNAMES_D variable in
/etc/psa/psa.conf Plesk's configuration file. This variable defines the location, where mail server should store mailboxes:
[root@server ~]# grep PLESK_MAILNAMES_D /etc/psa/psa.conf
Determine what mail server is used:
[root@server ~]# /usr/local/psa/admin/bin/mailmng --features | grep 'SMTP_Server\\|IMAP_POP3_Server'
$features['SMTP_Server'] = "postfix";
$features['IMAP_POP3_Server'] = "Courier-IMAP";
Stop the following services (example with
postfixas a mail server is used):
# /etc/init.d/postfix stop
/etc/psa/psa.conffile and change
PLESK_MAILNAMES_Dvariable. Specify the new location for email messages directory:
Note: only the
PLESK_MAILNAMES_D variable should be changed in
/etc/psa/psa.conf file. No other changes should be done.
**Note:** in order to avoid sufficient performance degradation, the new location for the email messages directory should be located in the local file system. It should not be mounted as a network share (NFS, for example).
Move mailboxes from current directory to the new location:
# cp -ap /var/qmail/mailnames/* <new-mailnames-directory>
In case of using
dovecot, set the new location in file
/etc/dovecot/dovecot.conffor these lines:
# Plesk Maildirs layout.
mail_home = /var/qmail/mailnames/%Ld/%Ln
mail_location = maildir:/var/qmail/mailnames/%Ld/%Ln/Maildir
and restart the service:
# service dovecot restart
After moving mailbox content, start services that were stopped previously and reconfigure mail settings using 'mchk' utility:
# /etc/init.d/postfix start
# /usr/local/psa/admin/sbin/mchk --with-spam