Master Users

Dovecot allows you to have Master Users who are able to log in as other users. It's also possible to directly log in as any user using a master password, although this isn't recommended.

Edit /usr/local/etc/dovecot/conf.d/auth-master.conf.ext and enable a passwd file for the master user(s):

passdb {
  driver = passwd-file
  master = yes
  args = /usr/local/etc/dovecot/passwd.masterusers

  # Unless you're using PAM, you probably still want the destination user to
  # be looked up from passdb that it really exists. pass=yes does that.
  pass = yes
}

Edit /usr/local/etc/dovecot/conf.d/10-auth.conf and add a separator for between the usernames. Also, enable the auth-master.conf.ext config file:

auth_master_user_separator = *

!include auth-master.conf.ext

Create the passwd file of master usernames and passwords with the htaccess program:

/usr/local/apache2/bin/htpasswd -c -s /usr/local/etc/dovecot/passwd.masterusers username

Roundcube Plugin
If you're going to use Roundcube to access a user's account, the Dovecot Impersonate plugin will strip the master information from the login form so that Roundcube fetches the proper set of user preferences.

cd /extra/src
wget https://github.com/corbosman/dovecot_impersonate/archive/2.1.tar.gz \
-O dovecot_impersonate-2.1.tar.gz
tar zxf dovecot_impersonate-2.1.tar.gz
mv dovecot_impersonate-2.1 /var/websites/mail/htdocs/roundcube/plugins/dovecot_impersonate

Add dovecot_impersonate to $config['plugins'] in /var/websites/mail/htdocs/roundcube/config/config.inc.php, such as:

$config['plugins'] = array('managesieve','dovecot_impersonate');

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Recent Updates

  • PHP
    1 year 7 months ago
    PHP 7.4
  • 1 year 7 months ago
    MariaDB 10.4.12
  • 1 year 7 months ago
    Dovecot 2.3.10
  • 1 year 7 months ago
    CentOS 6 revisions
  • 1 year 7 months ago
    Copy of the revision from Wed, 08/22/2018 - 13:39.
<