This needs quite a lot, first of all, CentOS package of Exim is missing MySQL support, there is no DBMail package, no pam-mysql package etc.
Most of the stuff needs to be compiled from source, i compiled pam-mysql from a SRPM, and for Exim + DBMail i took the tarballs. This is not very fast process to do, so please take your time. (I spent over a week just browsing thru docs etc.)
This is not done yet, i will complete this upon transferring the config to another server to make sure everything is correct. A lot of this is based on the Debian Exim + DBMail howto, thanks for creating it! This wouldn't been possible without that guide!
THIS IS STILL A STUB AND MISSING MOST OF THE NEEDED INFORMATION! Currently i do have one working system with this setup, but there really isn't a proper way to traceback all of my actions, and i do need to transfer this configuration to another server very soon (within couple days at max, probably today 06/01/2006), when i will fullfill all the information needed to here
These are the packages you should install using YUM at first: (assuming you have minimalistic installation)
mysql mysql-devel mysqlclient exim exim-sa db4 db4-devel
First, grab the tarball from exim.org copy src/EDITME to Local/Makefile and make adjustments:
Enable MySQL, Auth Plaintext & MD5 atleast.
modify these attributes to something similar:
LOOKUP_INCLUDE=-I /usr/include -I /usr/include/mysql LOOKUP_LIBS=-L/usr/lib/mysql -L/usr/lib -llber -lmysqlclient
Otherwise it won't find them. I didn't have LDAP, SQLITE3 etc. so i erased them, less options the better!
Exim Monitor didn't work, lot's of errors and really didn't need it so i commented it out.
EXIM_USER=exim FIXED_NEVER_USERS=root:bin:daemon AUTH_CRAM_MD5=yes AUTH_PLAINTEXT=yes SUPPORT_TLS=yes TLS_LIBS=-lssl -lcrypto
This is very easy and straightforward procedure:
tar -zxvf dbmail-2.0.7.tar.gz cd dbmail-2.0.7 ./configure --with-mysql make make install cp dbmail.conf /etc
Note that it does NOT belong to /etc/dbmail/ but to /etc/
Very straightforward actually, this is directly from the INSTALL file, i used phpmyadmin to assist me:
mysqladmin create dbmail -u root -p mysql -u root -p GRANT ALL ON dbmail.* to dbmail@localhost identified by '<pass>'; exit; mysql -u dbmail dbmail -p < sql/mysql/create_tables_innoDB.mysql
something along those lines atleast. now open the the config file, /etc/dbmail.conf
settings as follows, or something along these lines:
host=localhost #sqlport = sqlsocket=/var/run/mysql.sock user=DBUSER pass=DBPASS db=DATABASE #POSTMASTER =
as you can see, i showed with # signs which lines to comment out :)
then test it with:
and you should see something similar:
Opening connection to database... Opening connection to authentication... Ok. Connected. Checking DBMAIL messageblocks integrity... Ok. Found  unconnected messageblks. --- checking block integrity took 0 seconds --- checking block integrity took 0 seconds Checking DBMAIL message integrity... Ok. Found  unconnected messages. --- checking message integrity took 0 seconds --- checking message integrity took 0 seconds Checking DBMAIL mailbox integrity... Ok. Found  unconnected mailboxes. --- checking mailbox integrity took 0 seconds --- checking mailbox integrity took 0 seconds Checking DBMAIL for NULL messages... Ok. Found  NULL messages. --- checking NULL messages took 0 seconds Checking DBMAIL for NULL physmessages... Ok. Found  physmessages without messageblocks. --- checking NULL physmessages took 0 seconds Checking DBMAIL for incorrect is_header flags... Ok. Found  incorrect is_header flags. --- checking is_header flags took 0 seconds Counting messages with PURGE status... Ok. Found  messages with PURGE status. Counting messages with DELETE status... Ok. Found  messages with DELETE status. Vacuum and optimize not performed. Maintenance done. No errors found.