Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

What Is The Mail Location Defined By Dovecot for Cpanel?

Discussion in 'E-mail Discussion' started by mykkal, Mar 10, 2015.

  1. mykkal

    mykkal Well-Known Member

    Feb 9, 2007
    Likes Received:
    Trophy Points:
    Atlanta, Georgia, United States
    I moved one of my boxes to a non cpanel run server. I'm setting up Dovecot on it and need to know how mail was previously defined. The current location is defined below but I believe cpanel specifies home directories. I want to use the same setup because I will install cpanel on this box at some point. Just not for a few months.

    mail_location = mbox:~/mail:INBOX=/var/mail/%u
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    The /etc/dovecot/dovecot.conf file uses the following values:

    # Location for users' mailboxes. This is the same as the old default_mail_env
    # setting. The default is empty, which means that Dovecot tries to find the
    # mailboxes automatically. This won't work if the user doesn't have any mail
    # yet, so you should explicitly tell Dovecot the full location.
    # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
    # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
    # kept. This is called the "root mail directory", and it must be the first
    # path given in the mail_location setting.
    # There are a few special variables you can use, eg.:
    #   %u - username
    #   %n - user part in user@domain, same as %u if there's no domain
    #   %d - domain part in user@domain, empty if there's no domain
    #   %h - home directory
    # See doc/wiki/Variables.txt for full list. Some examples:
    #   mail_location = maildir:~/Maildir
    #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
    #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
    # <doc/wiki/MailLocation.txt>
    [%- IF mail_location.defined %]
    mail_location = [% mail_location %]
    [%- ELSE %]
    #mail_location =
    [%- END %]
    Please keep in mind that cPanel is designed for installation on a fresh operating system. You can't setup Dovecot and expect to smoothly integrate cPanel at a later time.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice