Article ID: 6312, created on May 13, 2009, last review on Apr 6, 2016

  • Applies to:
  • Plesk for Linux/Unix


Plesk stores email messages in the /var/qmail/mailnames/ directory. The partition where /var is located does not have enough disc space. So it is required to change the location of this directory.


There is PLESK_MAILNAMES_D variable in /etc/psa/psa.conf configuration file of Plesk. This variable defines the location, where mail server should store mailboxes:

# grep PLESK_MAILNAMES_D /etc/psa/psa.conf
PLESK_MAILNAMES_D /var/qmail/mailnames
  1. Determine what mail server is used:

    # /usr/local/psa/admin/bin/mailmng --features | grep 'SMTP_Server\|IMAP_POP3_Server'
    $features['SMTP_Server'] = "postfix";
    $features['IMAP_POP3_Server'] = "Courier-IMAP";
  2. Stop the following services (example with postfix as a mail server is used):

    # /etc/init.d/postfix stop
  3. Open the /etc/psa/psa.conf file in file editor and find PLESK_MAILNAMES_D variable. Specify the new location for this variable:

    PLESK_MAILNAMES_D <new-mailnames-directory>

    Note: in order to avoid sufficient performance degradation, the new location for the email messages directory (/opt/qmail/mailnames) should be within the local file system. It should not be mounted as a network (for example, NFS) share.

  4. Move mailboxes from current directory to the new location:

    # cp -a /var/qmail/mailnames <new-mailnames-directory>
  5. In case of using dovecot, set the new location in file /etc/dovecot/dovecot.conf for 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
  6. 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

Additional information

In the scope of this configuration, only the PLESK_MAILNAMES_D Plesk configuration variable should be changed in /etc/psa/psa.conf file. No other changes should be done, unless suggested explicitly by Plesk.

Search Words

change mailboxes location

How to change location of the directory with mailboxes in Parallels Plesk

mailboxes location

how to change mail location

mail location

a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF