1:安装centos 3&&mysql略过.....
2:postfix安装配置
a:down 所需要的RPM包kernel 2.4.21.-47.el
http://mirror.centos.org/centos/3.8/contrib/i386/RPMS/postfix-2.0.20-1.centos3.1.i386.rpm
rpm -ivh postfix-2.0.*.rpm
postconf -n > /etc/postfix/main2.cf mv /etc/postfix/main.cf /etc/postfix/main.cf.old mv /etc/postfix/main2.cf /etc/postfix/main.cf
再编辑main.cf:
增加如下内容:
# hostname mynetworks = 127.0.0.1 myhostname = mail.test1.com mydestination = $mynetworks $myhostname # banner mail_name = Postfix - by extmail.org smtpd_banner = $myhostname ESMTP $mail_name # response immediately smtpd_error_sleep_time = 0s unknown_local_recipient_reject_code = 450 # extmail config here virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_transport = maildrop:
内容如下:
user = mail password = mail hosts = localhost dbname = mail table = alias select_field = goto where_field = address
内容如下:
user = mail password = mail hosts = localhost dbname = mail table = domain select_field = description where_field = domain #additional_conditions = and backupmx ='0' and active ='1'
内容如下:
user = mail password = mail hosts = localhost dbname = mail table = mailbox select_field = maildir where_field = username #additional_conditions = and active = '1'
down 官方提供的包
http://www.extmail.org/source/ExtMail-Solution-Linux-0.1.tar.gz
解压后有很多可用的RPM...官方的包是提供给RHEL4.X的...所以本文所用到的centos3.8应适当更改其中
某些包的版本
rpm -ivh RPMS/libtool-libs-1.5.6-4.EL4.1.c4.3.i386.rpm rpm -ivh RPMS/courier-authlib-0.57-1hzq.i386.rpm rpm -ivh RPMS/courier-authlib-devel-0.57-1hzq.i386.rpm rpm -ivh RPMS/courier-authlib-mysql-0.57-1hzq.i386.rpm
编辑/etc/authlib/authmysqlrc文件
MYSQL_SERVER localhost MYSQL_USERNAME mail MYSQL_PASSWORD mail MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_PORT 3306 MYSQL_OPT 0 MYSQL_DATABASE mail MYSQL_USER_TABLE mailbox MYSQL_CRYPT_PWFIELD password MYSQL_UID_FIELD uidnumber MYSQL_GID_FIELD gidnumber MYSQL_LOGIN_FIELD username MYSQL_HOME_FIELD homedir MYSQL_NAME_FIELD name MYSQL_MAILDIR_FIELD maildir MYSQL_QUOTA_FIELD quota MYSQL_SELECT_CLAUSE SELECT username,password,"",uidnumber,gidnumber,/ CONCAT('/home/domains/',homedir), / CONCAT('/home/domains/',maildir), / quota, / name / FROM mailbox / WHERE username = '$(local_part)@$(domain)'
存盘退出后启动courier-authlib:
如一切正常,命令行将返回如下信息:
如果该目录权限不正确修改,maildrop及postfix等将无法正确获取用户的信息及密码认证:
http://mirror.centos.org/centos/3.8/contrib/i386/RPMS/maildrop-1.6.3-1.i386.rpm
http://mirror.centos.org/centos/3.8/contrib/i386/RPMS/maildrop-devel-1.6.3-1.i386.rpm
http://mirror.centos.org/centos/3.8/contrib/i386/RPMS/maildrop-man-1.6.3-1.i386.rpm