Aaron
2010-Oct-07 23:42 UTC
[Dovecot] Qmail+Vpopmail+Mysql+Dovecot 2.x (Notes on a successful conversion)
SoI had a hell of a time converting my qmail install to dovecot 2.0.5, so I thought I'd pass on what I learned. 1. When using vpopmail, do not use " --disable-many-domains". If you do, you'll need to recompile vpopmail without that setting and use the script found at http://qmailrocks.thibs.com/downloads/scripts/migrate-vpopmail-many-domains to collapse the tables. 2. Switch to mysql authentication. The following snippet works well. driver = mysql connect = host=/var/run/mysqld/mysqld.sock user=vpopmail password=YOURPASS dbname=vpopmail default_pass_scheme = PLAIN password_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, pw_clear_passwd AS password FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' user_query = SELECT pw_dir as home, 1008 AS uid, 1003 AS gid FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' 3. When integrating Sieve, vpopmail apparently needs to own auth-master and authdb. (example available on request) 4. If coming from maildrop as the LDA, you can put the following in your maildroprc to allow a gentler transition (or to keep maildrop's ability to call external applications) `test -r /usr/libexec/dovecot/deliver` if ( $RETURNCODE == 0) { `test -r $HOME/$EXT/.sieve` if ( $RETURNCODE == 0) { to "| /usr/libexec/dovecot/deliver -d $EXT@$USER" } } 5. When completely switching, you can either replace the .qmail files or use one of the following in qmail/control/defaultdelivery |/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver -d $EXT@$USER |/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver -d ${EXT/-*}@$USER -a $EXT@$USER -- This should allow a final conversion to vpopmail 5.5 (from 5.4.30) with dovecot 2.0.x.. I haven't done that final step yet, but it should now work. Anyhow, I hope this saves someone a few days of head scratching. a.
Matt Brookings
2010-Oct-08 17:14 UTC
[Dovecot] Qmail+Vpopmail+Mysql+Dovecot 2.x (Notes on a successful conversion)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/07/2010 06:42 PM, Aaron wrote:> SoI had a hell of a time converting my qmail install to dovecot 2.0.5, > so I thought I'd pass on what I learned. > > 1. When using vpopmail, do not use " --disable-many-domains". If you > do, you'll need to recompile vpopmail without that setting and use the > script found at > http://qmailrocks.thibs.com/downloads/scripts/migrate-vpopmail-many-domains > to collapse the tables. > > 2. Switch to mysql authentication. The following snippet works well. > > driver = mysql > connect = host=/var/run/mysqld/mysqld.sock user=vpopmail > password=YOURPASS dbname=vpopmail > default_pass_scheme = PLAIN > password_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, > pw_clear_passwd AS password FROM vpopmail WHERE pw_name = '%n' AND > pw_domain = '%d' > user_query = SELECT pw_dir as home, 1008 AS uid, 1003 AS gid FROM > vpopmail WHERE pw_name = '%n' AND pw_domain = '%d'Just a quick FYI: You could just use the vpopmail driver that comes with Dovecot. It's easier to configure, and it does not matter what backend database you use. - -- /* Matt Brookings <matt at inter7.com> GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyvUXkACgkQIwet2/rgZyzYRwCfbYROYzuoMkgv6Erdwib7Ybnv AP8AmQFcrsrJMIo7v+lceynm0dGzZZOW =Xfyb -----END PGP SIGNATURE-----