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

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 4 days ago
    php 8.x
  • 2 years 6 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff