分类: LINUX
2007-06-01 22:39:54
5. 安装vpopmail
[root@mail root]# groupadd vchkpw -g 89
[root@mail root]# useradd vpopmail -u 89 -g vchkpw
[root@mail root]# cd /app/src
[root@mail src]# tar -zxf vpopmail-
[root@mail src]# cd vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail etc]# tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp
[root@mail etc]# echo "localhost|0|vpopmail|zlwt|vpopmail" > /home/vpopmail/etc/vpopmail.mysql
[root@mail etc]# chmod 640 /home/vpopmail/etc/vpopmail.mysql
[root@mail etc]# chown -R vpopmail.vchkpw /home/vpopmail/etc
[root@mail etc]# mysql -u root -pzlwt
mysql> CREATE DATABASE vpopmail;
Query OK, 1 row affected (0.04 sec)
mysql> GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmail@localhost IDENTIFIED BY 'zlwt';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> QUIT
[root@mail etc]# cd /app/src/vpopmail-
[root@mail vpopmail-
> --enable-libdir=/usr/lib/mysql --disable-roaming-users --enable-logging=p \
> --disable-passwd --enable-clear-passwd --disable-domain-quotas \
> --enable-auth-module=mysql --enable-auth-logging --enable-sql-logging \
> --disable-valias --disable-mysql-limits --enable-learn-passwords
vpopmail
Current settings
---------------------------------------
vpopmail directory = /home/vpopmail
uid = 89
gid = 89
roaming users = OFF --disable-roaming-users (default)
password learning = ON --enable-learn-passwords
md5 passwords = ON --enable-md5-passwords (default)
file locking = ON --enable-file-locking (default)
vdelivermail fsync = OFF --disable-file-sync (default)
make seekable = ON --enable-make-seekable (default)
clear passwd = ON --enable-clear-passwd (default)
user dir hashing = ON --enable-users-big-dir (default)
address extensions = OFF --disable-qmail-ext (default)
ip alias = OFF --disable-ip-alias-domains (default)
domain quotas = OFF --disable-domainquotas (default)
auth module = mysql --enable-auth-module=mysql
mysql replication = OFF --disable-mysql-replication (default)
sql logging = ON --enable-sql-logging
mysql limits = OFF --disable-mysql-limits (default)
MySQL valias = OFF --disable-valias (default)
auth inc = -I/usr/include/mysql
auth lib = -L/usr/lib/mysql -lmysqlclient -lz -lm
system passwords = OFF --disable-passwd (default)
pop syslog = show failed attempts with clear text password
--enable-logging=p
auth logging = ON --enable-auth-logging (default)
all domains in one SQL table = --enable-many-domains (default)
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
Reply-To: postmaster@domain.com
To: 邮箱用户
Subject: 邮箱空间警告
Mime-Version: 1.0
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: base64
您的邮箱空间已经达到90%.如果想继续使用,请删除一些信件.
如果需要帮助,请联系邮箱管理员:
Email : postmaster@domain.com
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail vpopmail-
[root@mail netqmail-1.05]# bunzip2 -c /app/src/qmail-toaster-
[root@mail netqmail-1.05]# make clean
rm -f `cat TARGETS`
[root@mail netqmail-1.05]# make
[root@mail netqmail-1.05]#
[root@mail netqmail-1.05]# qmailctl stop
Stopping qmail...
qmail-send
qmail-smtpd
[root@mail netqmail-1.05]# make setup check
[root@mail netqmail-1.05]# chown -R vpopmail:vchkpw /var/qmail/spam
[root@mail netqmail-1.05]# make cert
Country Name (2 letter code) [GB]:CN
[root@mail root]# cd /app/src/netqmail-1.05/netqmail-1.05
[root@mail netqmail-1.05]# make tmprsadh
[root@mail netqmail-1.05]# chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem
# 用"crontab -e"在crontab里增加下面这条,每天晚上更新temp keys
01 01 * * * /var/qmail/bin/update_tmprsadh > /dev/null 2>&1
[root@mail netqmail-1.05]# qmailctl start
Starting qmail
[root@mail netqmail-1.05]#
[root@mail netqmail-1.05]# ln -s /var/qmail/supervise/qmail-pop3d /service
[root@mail netqmail-1.05]# ln -s /var/qmail/supervise/qmail-pop3ds /service
[root@mail netqmail-1.05]#
[root@mail netqmail-1.05]# vpopmailctl start
Starting qmail-pop3d
Starting qmail-pop3ds
[root@mail netqmail-1.05]#
[root@mail root]# cd /app/src
[root@mail src]# tar -xjf courier-authlib-0.55.tar.bz2
[root@mail src]# cd courier-authlib-0.55
[root@mail courier-authlib-0.55]# ./configure --prefix=/usr/local --exec-prefix=/usr/local \
> --with-authvchkpw --without-authldap --without-authmysql --disable-root-check \
> --with-ssl --with-authchange pwdir=/usr/local/libexec/authlib --with-redhat
[root@mail courier-authlib-0.55]# make
[root@mail courier-authlib-0.55]# make install
[root@mail courier-authlib-0.55]# make install-configure
[root@mail courier-authlib-0.55]# vi /usr/local/etc/authlib/authdaemonrc
authmodulelist="authvchkpw"
[root@mail courier-authlib-0.55]# cp courier-authlib.sysvinit /etc/init.d/courier-authlib
[root@mail courier-authlib-0.55]# chmod 755 /etc/init.d/courier-authlib
[root@mail courier-authlib-0.55]# ln -s ../init.d/courier-authlib /etc/rc3.d/S80courier-authlib
[root@mail courier-authlib-0.55]# ln -s ../init.d/courier-authlib /etc/rc5.d/S80courier-authlib
[root@mail courier-authlib-0.55]# /etc/init.d/courier-authlib start
Starting Courier authentication services: authdaemond
[root@mail courier-authlib-0.55]#
[root@mail courier-authlib-0.55]# authtest 1234
Authentication succeeded.
Authenticated: (uid 89, gid 89)
Home Directory: /home/vpopmail/domains/u-happy.com/zhou
Maildir: (none)
Quota: (none)
Encrypted Password: $1$TcWL6BBO$QQGPpi7W3KaPJP6isq26T.
Cleartext Password: 1234
Options: disablewebmail=0,disablepop3=0,disableimap=0
[root@mail courier-authlib-0.55]#
[root@mail courier-authlib-0.55]# cd /app/src
[root@mail src]# tar -xjf courier-imap-
[root@mail src]# cd courier-imap-
[root@mail courier-imap-
[root@mail courier-imap-
[vpopmail@mail courier-imap-
[vpopmail@mail courier-imap-
[vpopmail@mail courier-imap-
exit
[root@mail courier-imap-
[root@mail courier-imap-
[root@mail courier-imap-
[root@mail courier-imap-
[root@mail courier-imap-
[root@mail courier-imap-
courier-imap 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@mail courier-imap-
[root@mail courier-imap-
IMAPDSTART=YES
[root@mail courier-imap-
IMAPDSSLSTART=YES
[root@mail courier-imap-
CN=happy.com
[root@mail courier-imap-
CN=happy.com
[root@mail courier-imap-