I installed qmail, courier-imap, and vpopmail for virtual e-mail hosting.
vpopmail-5.2.1-r5 worked fine, however when I upgraded to vpopmail-5.2.1-r7
e-mail stopped being delivered. I looked at /var/log/qmail/qmail-send/current
and noticed the following error:
delivery 1: deferral:
could_not_connect_to_mysql_update_server_Access_denied_for_user:_'root@localhost'_(Using_password:_YES)_with_database/could_not_connect_to_mysql_update_server_Access_denied_for_user:_'root@localhost'_(Using_password:_YES)/
I was still able to add users and domains and see them being updated in the
MySQL database. Also, I noticed that the username it mentioned in the error is
root, however the user in /etc/vpopmail.conf is vpopmail. It seems the
vdelivermail application is not successfully using the mysql config file patch
for vpopmail. I downloaded vpopmail-5.2.1, applied all patches but that patch,
manually set the database info in vmysql.h, used the following config options
(copied from the config used in the ebuild for vpopmail-5.32.1-r7):
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --enable-ip-alias-domains=n --enable-mysql=y
--enable-libs=/usr/include/mysql --enable-sqllibdir=/usr/lib/mysql
--enable-mysql-logging=y --enable-auth-logging=y --enable-valias=y
--enable-mysql-replication=n --enable-clear-passwd=y --sbindir=/usr/sbin
--bindir=/usr/bin --sysconfdir=/var/vpopmail/etc --enable-qmaildir=/var/qmail
--enable-qmail-newu=/var/qmail/bin/qmail-newu
--enable-qmail-inject=/var/qmail/bin/qmail-inject
--enable-qmail-newmrh=/var/qmail/bin/qmail-newmrh --enable-vpopuser=vpopmail
--enable-many-domains=y --enable-vpopgroup=vpopmail --enable-file-locking=y
--enable-file-sync=y --enable-md5-passwords=y
--enable-defaultquota=30000000,1000C --enable-roaming-users=y
--enable-relay-clear-minutes=60 --enable-tcprules-prog=/usr/bin/tcprules
--enable-tcpserver-file=/etc/tcp.smtp --enable-logging=y --enable-log-name=vpopmail
then did a make, make install-strip and manually setup the cron job. After
doing that everything is working fine. To the best of my knowledge the problem
is isolated down to the /usr/portage/distfiles/vpopmail-5.2.1-mysql.diff patch
not working for vdelivermail.
Here are my use flags and I do not have unstable enabled or anything in
/usr/local/portage
USE="apache2 berkdb clearpasswd crypt curl doc flash gd gdbm gpm imap ldap
maildir mcal memlimit mysql ncurses pam perl postgres python readline samba snmp
ssl tcltk tiff usb xml xml2 zlib -alsa -cups -gnome -gtk -kde -motif -X"
This was all done after doing an emerge sync and emerge -u world and was done on
the evening of Oct 7th.
Reproducible: Always
Steps to Reproduce:
1. install qmail (emerge qmail)
2. install vpopmail (emerge vpopmail)
3. install courier-imap (emerge courier-imap)
4. add a domain (vadddomain test.com)
5. add an account (adduser test@test.com)
6. send mail to the new user
Actual Results:
The mail was not delivered and the above error was in
/var/log/qmail/qmail-send/current
Expected Results:
delivered the mail to the user
I had apache2 and bind running as well. I did have a proper /etc/tcp.smtp file
setup. I can repeatedly uninstall qmail, vpopmail, courier-imap, delete
/var/qmail, /var/vpopmail, /var/log/qmail, /etc/vpopmail.conf, and
/etc/courier-imap and re-install everything from scratch and I have the same
exact error.
the file is owned by root.root and its permissions are 600
This was the problem. ;)
By chowning /etc/vpopmail.conf to vpopmail.vpopmail after emerging vpopmail
everything is working fine again.
Even though that should have been obvious to me it would be helpful if the
ebuild could do that when it creates the file.