Here's a new release of the patch taht incorporates new features such as: 1) better configuration through config files 2) better implimentation of MySQL map Here's a couple of points on installation: 1) Go grab sendmail-8.9.3 from ftp.sendmail.org 2) Untar the distribution 3) copy sendmail+mysql-0.2.1beta2.patch into sendmail source tree 4) type "patch -p1 < sendmail+mysql-0.2.1beta2.patch" 5) Edit src/mysql_sendmail.h as follows: #define ALIAS_LHS "address" --> replace by what you want #define ALIAS_RHS "alias" --> replace by what you want 6) type "make" in the top directory of the source tree 7) type "make install" or copy src/obj. to your location ex: /usr/sbin 8) do "chmod +s /usr/sbin/sendmail" if not doing "make install" 9) edit sendmail_mysql.conf to your liking and copy it into /etc (do not leave anything blank except MysqlLHSColumn and MysqlRHSColumn when not using MySQL map) If you want to use MySQL map do the following: 1) just after patching the source tree edit src/Makefile.m4 and put the following(i put it there by default, if dont want to use it, take it out): # environment definitions (e.g., -D_AIX3) ENVDEF= -DMYSQL_MAP ifdef(`confENVDEF', `confENVDEF') 2) when finnished installing edit sendmail_mysql.conf and fill up MysqlLHSColumn and MysqlRHSColumn 3) edit your /etc/sendmail.cf: "K " where options are: 1) generic ones like: -N -O -o -f -a -A -t -q -m -T 2) mysql specific: -H -U -P -D -M -L -R 4) create an Ruleset to use with that map ex of mine: ################################################################### ### Ruleset 98 -- local part of ruleset zero (can be null) ### ################################################################### S98 R$+ < $+ . > $1 < $2 > remove trailing dots R$+ < $+ > $: < > $(domainalias $1$2 $) match user@address R< > $+ @ $* $: < $1 > $(domainalias * @ $2 $) match*@address R< $+ > * $* $: < > $1 $2 replace * with userid R < $+ > $+ $: < > $2 bugfix R< > $* $: $>3 $1 and rewrite using S3 5) create your database: Tables: USERS: mysql> desc users; <- user table name +----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+----------------+ | username | char(32) | YES | | NULL | | | passwd | char(32) | YES | | NULL | | | uid | mediumint(9) | | PRI | 0 | auto_increment | | gid | mediumint(9) | YES | | NULL | | | gecos | char(32) | YES | | NULL | | | home_dir | char(32) | YES | | NULL | | | shell | char(32) | YES | | NULL | | | maildrop | char(128) | YES | | NULL | | +----------+--------------+------+-----+---------+----------------+ 8 rows in set (0.00 sec) ALIAS: mysql> desc alias; <- alias table name +---------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-----------+------+-----+---------+-------+ ALIAS_LHS-> | address | char(128) | YES | | NULL | | ALIAS_RHS-> | alias | char(128) | YES | | NULL | | +---------+-----------+------+-----+---------+-------+ 2 rows in set (0.00 sec) MYSQL_MAP: mysql> desc domainalias; <- MySQL map table name +-------------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-----------+------+-----+---------+-------+ LHS-> | address | char(128) | YES | | NULL | | RHS-> | domainalias | char(128) | YES | | NULL | | +-------------+-----------+------+-----+---------+-------+ 2 rows in set (0.00 sec) sampe sendmail_mysql.conf: ############################################################################## # General (can be overriden in sendmail.cf by per map options for MySQL map) # DO NOT leave blank ############################################################################## MysqlHost host MysqlUsername user MysqlPassword passwd MysqlDatabase database_name MysqlUserTable users_table_name MysqlAliasTable alias_table_name MysqlMapTable mysql_map_table_name ############################################################################## # For the MySQL MAP only (for alias you have to define it in # mysql_sendmail.h before you compile) ONLY leave blank if not using MySQL map ############################################################################## MysqlLHSColumn LHS_column_name # Left hand side of the MySQL Map table MysqlRHSColumn RHS_column_name # Left hand side of the MySQL Map table