隨著互聯網的飛速發展,電子郵件已經成為人們生活中必不可少的通信工具。架設郵件系統相對來說比較的麻煩些,在網上有很多的相關資料可以查閱。真的很感謝這麼多熱於奉獻的網友,使這個網絡更加的強大。一直以來都想架設自己的MAIL服務器,由於時間和條件的關系未曾如願,等到有空了一心放 到這上面的時候,又遇到了各種各樣的問題,在我永不放棄信念下,我架設的郵件服務器終於告成。當然了,功能還有太多不完善的地方,我會在以後的時間加以彌補,使其更加的強大。此次嘗試感觸頗多,學習是一個永無止境的過程,
永遠不要停滯在一個地方頑固不前,遇到問題一定要解決它,在遇到問題和解決問題的過程中找到人生樂趣。以下我把自己的安裝過程寫出來,不求給廣大網友指點迷津,只求自己能夠三省吾身。相信自己,一天成長一點,一天積累一點。
安裝ucspi-tcp用來簡單的建立客戶機-服務器tcp後台程序
[root@mail mail]# tar zxvf ucspi-tcp0.88.tar.gz
[root@mail mail]# cd ucspi-tcp-0.88
[root@mail mail]# make
[root@mail ucspi-tcp-0.88]# make setup check
./install
./instcheck
安裝daemontools
――――――是inetd和winetd的代替品,用它來監聽qmail-send,qmail-smtpd,qmail-pop3d
[root@mail ucspi-tcp-0.88]# mkdir -p /package
[root@mail ucspi-tcp-0.88]# chmod 1755 /package/
[root@mail ucspi-tcp-0.88]# cd /package/
[root@mail package]# tar zxvf daemontools-0.76.tar.gz
[root@mail package]# cd admin/daemontools-0.76/
[root@mail daemontools-0.76]# patch -p1</package/daemontools-0.76.errno.patch
patching file src/error.h
[root@mail daemontools-0.76]# package/install
Adding svscanboot to inittab...
init should start svscan now.
測試如下:
[root@mail httpd-2.0.50]# sleep 5
[root@mail httpd-2.0.50]# ps ax|grep svscan
31570 ? S 0:00 /bin/sh /command/svscanboot
31572 ? S 0:00 svscan /service
31580 pts/1 S 0:00 grep svscan
安裝qmail―――本文的主角,世界上使用最廣的郵件系統之一
[root@mail mail]# tar zxvf qmail-1.03.tar.gz
[root@mail mail]# cd qmail-1.03
[root@mail qmail-1.03]# patch -p1<../qmail-1.03.errno.patch
patching file cdb_seek.c
patching file dns.c
patching file error.3
patching file error.h
[root@mail qmail-1.03]# mkdir /var/qmail
[root@mail qmail-1.03]# groupadd nofiles
[root@mail qmail-1.03]# useradd -g nofiles -d /var/qmail/alias alias
[root@mail qmail-1.03]# useradd -g nofiles -d /var/qmail qmaild
[root@mail qmail-1.03]# useradd -g n
ofiles -d /var/qmail qmaill
[root@mail qmail-1.03]# useradd -g nofiles -d /var/qmail qmailp
[root@mail qmail-1.03]# groupadd qmail
[root@mail qmail-1.03]# useradd -g qmail -d /var/qmail qmailq
[root@mail qmail-1.03]# useradd -g qmail -d /var/qmail qmailr
[root@mail qmail-1.03]# useradd -g qmail -d /var/qmail qmails
[root@mail qmail-1.03]# make
[root@mail qmail-1.03]# make setup check
[root@mail qmail-1.03]# ./config-fast mail.china-yr.com
Your fully qualified host name is mail.china-yr.com.
Putting mail.china-yr.com into control/me...
Putting china-yr.com into control/defaultdomain...
Putting china-yr.com into control/plusdomain...
Putting mail.china-yr.com into control/locals...
Putting mail.china-yr.com into control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to mail.china-yr.com.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
[root@mail qmail-1.03]# cd ~alias;touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
[root@mail alias]# chmod 644 ~alias/.qmail*
在ftp://ftp.pipeline.com.au/pipeint/sources/linux/WebMail/qmailctl.txt
下載qmailctl.txt 並且上傳到指定目錄
[root@mail mail]# cp qmailctl.txt /etc/init.d/qmail
[root@mail mail]# mkdir -p /var/qmail/supervise/qmail-send/log
[root@mail mail]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
[root@mail mail]# mkdir -p /var/qmail/supervise/qmail-pop3d/log
[root@mail mail]# vi /var/qmail/supervise/qmail-send/run
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" qmail-start ./Maildir/
[root@mail mail]# vi /var/qmail/supervise/qmail-send/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t \
s10000000 n30 /var/log/qmail/send
[root@mail mail]# vi /var/qmail/supervise/qmail-smtpd/run
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver \
-H -l hostname.yourdomain.com \
-v -x /etc/tcp.smtp.cdb \
-c
20 -R -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/var/qmail/bin/qmail-smtpd hostname.yourdomain.com \
/var/lib/vpopmail/bin/vchkpw /bin/true 2>&1
[root@mail mail]# vi /var/qmail/supervise/qmail-smtpd/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 \
n30 /var/log/qmail/smtpd
[root@mail mail]# vi /var/qmail/supervise/qmail-pop3d/run
/usr/local/bin/tcpserver \
-H -l example.com \
-v -x /etc/tcp.pop3.cdb -c 30 -R 0 pop3 \
/var/qmail/bin/qmail-popup example.com \
/var/lib/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1
[root@mail mail]# vi /var/qmail/supervise/qmail-pop3d/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 \
n30 /var/log/qmail/pop3d
[root@mail mail]# chmod 755 /var/qmail/supervise/qmail-send/run
[root@mail mail]# chmod 755 /var/qmail/supervise/qmail-send/log/run
[root@mail mail]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
[root@mail mail]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
[root@mail mail]# chmod 755 /var/qmail/supervise/qmail-pop3d/run
[root@mail mail]# chmod 755 /var/qmail/supervise/qmail-pop3d/log/run
[root@mail mail]# mkdir /var/log/qmail
[root@mail mail]# mkdir /var/log/qmail/smtpd
[root@mail mail]# mkdir /var/log/qmail/send
[root@mail mail]# mkdir /var/log/qmail/pop3d
[root@mail mail]# chown -R qmaill /var/log/qmail
[root@mail mail]# ln -s /var/qmail/supervise/qmail-send /service/
[root@mail mail]# ln -s /var/qmail/supervise/qmail-smtpd/ /service/
[root@mail mail]# ln -s /var/qmail/supervise/qmail-pop3d/ /service/
[root@mail mail]# vi /var/qmail/supervise/qmail-smtpd/run
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver \
-H -l mail.china-yr.com \
-v -x /etc/tcp.smtp.cdb \
-c 20 -R -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/var/qmail/bin/qmail-smtpd mail.china-yr.com
\
[root@mail mail]# vi /var/qmail/supervise/qmail-pop3d/run
#!/bin/sh
exec /usr/local/bin/softlimit -m 3000000 \
/usr/local/bin/tcpserver \
-H -l mail.china-yr.com \
-v -x /etc/tcp.pop3.cdb -c 30 -R 0 pop3 \
/var/qmail/bin/qmail-popup mail.china-yr.com \
/var/lib/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1
[root@mail mail]# cd /etc/init.d/
[root@mail init.d]# chmod +x qmail
[root@mail init.d]# /etc/init.d/qmail start
Starting qmail
[root@mail init.d]# groupadd -g 89 vchkpw
[root@mail init.d]# useradd -g vchkpw -u 89 -d /home/vpopmail vpopmail
[root@mail init.d]# mkdir -p /home/vpopmail/etc
[root@mail init.d]# echo "china-yr.com">/home/vpopmail/etc/defaultdomain
[root@mail init.d]# echo '127.0.0.1:allow,RELAYCLIENT=""'>/home/vpopmail/etc/tcp.smtp
[root@mail init.d]# cd /home/vpopmail/etc ; tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp
[root@mail etc]# echo "localhost|0|vpopmail|123456|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
安裝VPOPMAIL
---一個以qmail為基礎的虛擬域管理包,其允許在一個IP地址添加多個虛擬域
[root@mail vpopmail-5.4.0]# ./configure --enable-auth-module=mysql --enable-auth-logging=n --enable-mysql-logging=n --enable-logging=e --enable-valias=y --enable-pssswd=n --enable-roaming-users=y --enable-incdir=/usr/
local/mysql/include --enable-libdir=/usr/local/mysql/lib
Current settings
---------------------------------------
vpopmail directory = /home/vpopmail
uid = 89
gid = 89
roaming users = ON --enable-roaming-users
tcpserver file = /home/vpopmail/etc/tcp.smtp
open_smtp file = /home/vpopmail/etc/open-smtp
rebuild tcpserver file = ON --enable-rebuild-tcpserver-file (default)
password learning = OFF --disable-learn-passwords (default)
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)
mysql logging = OFF --disable-mysql-logging (default)
mysql limits = OFF --disable-mysql-limits (default)
MySQL valias = ON --enable-valias
auth inc = -I/usr/local/mysql/include
auth lib = -L/usr/local/mysql/lib -lmysqlclient -lz
system passwords = OFF --disable-passwd (default)
pop syslog = show only failed attempts
--enable-logging=e (default)
auth logging = OFF --disable-auth-logging
all domains in one SQL table = --enable-many-domains (default)
[root@mail vpopmail-5.4.0]# make
出現錯誤:如下…..
vauth.c: In function `vwrite_dir_control':
vauth.c:1101: warning: format argument is not a pointer (arg 3)
vauth.c: In function `vcreate_dir_control':
vauth.c:1117: warning: format argument is not a pointer (arg 3)
vauth.c:1138: warning: format argument is not a pointer (arg 3)
vauth.c: In function `vdel_dir_control':
vauth.c:1155: warning: format argument is not a pointer (arg 3)
vauth.c: In function `valias_select':
vauth.c:1263: warning: format argument is not a pointer (arg 3)
vauth.c:1267: warning: assignment makes pointer from integer without a cast
vauth.c: In function `valias_select_next':
vauth.c:1274: error: subscripted value is neither array nor pointer
vauth.c: In function `valias_insert':
vauth.c:1294: warning: format argument is not a pointer (arg 3)
vauth.c: In function `valias_remove':
vauth.c:1314: warning: format argument is not a pointer (arg 3)
vauth.c: In function `valias_delete':
vauth.c:1334: warning: format argument is not a pointer (arg 3)
vauth.c: In function `valias_delete_domain':
vauth.c:1354: warni
ng: format argument is not a pointer (arg 3)
vauth.c: In function `vcreate_valias_table':
vauth.c:1368: warning: format argument is not a pointer (arg 3)
vauth.c: In function `valias_select_all':
vauth.c:1386: warning: format argument is not a pointer (arg 3)
vauth.c:1390: warning: assignment makes pointer from integer without a cast
vauth.c: In function `valias_select_all_next':
vauth.c:1397: error: subscripted value is neither array nor pointer
vauth.c:1398: error: subscripted value is neither array nor pointer
make[2]: *** [vauth.o] Error 1
make[2]: Leaving directory `/home/mail/vpopmail-5.4.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mail/vpopmail-5.4.0'
make: *** [all] Error 2
解決方案:如下….
因為是重新編譯,所以一定要用命令make clean把生成的文件刪除然後再重新編譯就可以了
[root@mail vpopmail-5.4.0]#
vpopmail directory = /home/vpopmail
uid = 89
gid = 89
roaming users = ON --enable-roaming-users
tcpserver file = /home/vpopmail/etc/tcp.smtp
open_smtp file = /home/vpopmail/etc/open-smtp
rebuild tcpserver file = ON --enable-rebuild-tcpserver-file (default)
password learning = OFF --disable-learn-passwords (default)
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)
mysql logging = OFF --disable-mysql-logging (default)
mysql limits = OFF --disable-mysql-limits (default)
MySQL valias = ON --enable-valias
auth inc = -I/usr/local/mysql/include/mysql
auth lib = -L/usr/local/mysql/l
ib/mysql -lmysqlclient -lz
system passwords = OFF --disable-passwd (default)
pop syslog = show only failed attempts
--enable-logging=e (default)
auth logging = OFF --disable-auth-logging
all domains in one SQL table = --enable-many-domains (default)
[root@mail vpopmail-5.4.0]# make install-strip
[root@mail bin]# ./vadddomain china-yr.com
./vadddomain: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
增加虛擬域的時候出現如上問題:
解決方案: [root@mail bin]# cp /usr/local/mysql/lib/mysql/ /usr/lib/ -Rf
[root@mail bin]# echo "/usr/local/mysql/lib/mysql/">>/etc/ld.so.conf
[root@mail bin]# ldconfig -v|grep libmysqlclient
libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
然後增加虛擬域的時候就可以成功了:)
[root@mail bin]# ./vadddomain china-yr.com
Please enter password for postmaster:
[root@mail bin]# ./vadddomain china-yr.com
Please enter password for postmaster:
enter password again:
[root@mail bin]# ./vadduser [email protected]
Please enter password for [email protected]:
enter password again:
安裝courier-imap郵件系統的IMAP模塊
[root@mail mail]# tar jxvf courier-imap-4.0.6.tar.bz2
[root@mail mail]# cd courier-imap-4.0.6
安裝這個軟件的時候解壓配置必須用非ROOT用戶的普通用戶才行。等到編譯的時候再切換為超級用戶ROOT帳戶。
[vpopmail@mail mail]$ tar zxvf courier-imap-4.0.6.tar.gz
[vpopmail@mail courier-imap-4.0.6]$ cd courier-imap-4.0.6
[vpopmail@mail courier-imap-4.0.6]$ ./configure --prefix=/usr/local/courier-imap
--with-authvchkpw --with-redhat
checking for courierauthconfig... no
configure: WARNING: === Courier authentication library not found.
configure: WARNING: === You need to download and install
configure: WARNING: === http://www.courier-mta.org/download.php#authlib first.
configure: WARNING: === If courier-authlib is installed in a non-default
configure: WARNING: === directory, set the COURIERAUTHCONFIG environment
configure: WARNING: === variable to the full path to the courierauthconfig
configure: WARNING: === binary and rerun this configure script.
>configure: WARNING:
configure: error: courierauthconfig not found
出現上述相關聯錯誤,
解決方案必須安裝一個叫做authentication library的包.到http://www.courier-mta.org/download.php#authlib 這個地方來下載..
安裝: courier-authlib-0.58.tar.gz
注:在安裝的時候會出現下面這樣的錯誤,一定要先解決他們的關聯性才可在繼續安裝
/bin/sh authmigrate
make install-configure
checking for courier-config... no
checking for expect... no
configure: WARNING: -----------------------------------------------------
configure: WARNING: expect not found - will not be able to change passwds
configure: WARNING: in webmail
configure: WARNING: -----------------------------------------------------
checking for passwd... /usr/bin/passwd
checking whether -lm is needed for floor... yes
checking for socket in -lsocket... no
checking for socket in -lsocket... (cached) no
checking for connect in -lsocket... no
checking for connect in -lsocket... (cached) no
checking for gdbm_open in -lgdbm... no
checking for gdbm_open... no
checking for dbopen in -ldb... no
checking for db_open in -ldb... no
checking for db_env_create in -ldb... no
checking for dbopen... no
checking for db_open... no
checking for db_env_create... no
configure: error: Cannot find either the gdbm or the db library.
出現上述錯誤,解決方案是安裝下面的軟件在進行
[root@mail mail]# rpm -ihv gdbm-devel-1.8.0-25.i386.rpm
warning: gdbm-devel-1.8.0-25.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ########################################### [100%]
1:gdbm-devel ########################################### [100%]
[root@mail courier-authlib-0.58]# ./configure --prefix=/usr/local/courier-auth --with-redhat --with-mysql-libs=/usr/local/mysql/lib/mysql/ --with-mysql-includes=/usr/local/mysql/include/mysql/ --with-gd=gdbm
[root@mail courier-authlib-0.58]# make
[root@mail courier-authlib-0.58]# make install
[root@mail courier-authlib-0.58]# make install-migrate
[root@mail courier-authlib-0.
58]# make install-configure
注意:安裝之後一定要確保起動來了.不然還會出現上述錯誤.
解決方案如下:(如下是我在網上查到的一些資料,有問題和答案,大家可以做一下參考)
On Wed, Oct 26, 2005 at 08:21:39AM -0700, Mike Baker wrote: > I am trying to install Courier-Imap with the --with-redhat tag. The
> install clips along fine until this:
> checking for courierauthconfig... no > configure: WARNING: === Courier authentication library not found.
> configure: WARNING: === You need to download and install
> configure: WARNING: ===
> [1]http://www.courier-mta.org/download.php#authlib first.
> configure: WARNING: === If courier-authlib is installed in a
> non-default
> configure: WARNING: === directory, set the COURIERAUTHCONFIG
> environment
> configure: WARNING: === variable to the full path to the
> courierauthconfig
> configure: WARNING: === binary and rerun this configure script.
> configure: WARNING:
> configure: error: courierauthconfig not found
> What's weird is I already installed Courier Authentication. In fact,
> when I su as root, I can run courier-auth start and it starts okay.
> I suspect that something is in a non-default location. None of the
> procedures I'm working from reference 'courierauthconfig'. Where do I
> find this? Is it a file or maybe a directory name?
There's no script "courier-auth start" in a default installation. What O/S and packaging system are you using? What version of courier-authlib did you install?
Note that you can't run a modern courier-imap (4.x) using the authdaemon which comes in a older version of courier-imap (3.x). You really must install courier-authlib as a separate package.
If you are building directly from source, and you have a recent courier-authlib (0.57 preferably), then the following should help.
If you start authdaemond using
# /foo/sbin/authdaemond start
then courierauthconfig is most likely in
# /foo/bin/courierauthconfig
Otherwise look for it using:
# which courierauthconfig
# locate courierauthconfig
# find / -type f -name courierauthconfig
Once you know what directory it's in, make sure that directory is in the $PATH be
fore running ./configure in the courier-imap source directory. In
the above example:
$ PATH=/foo/bin:$PATH
$ export PATH
$ ./configure ...
Regards,
Brian.
[root@mail local]# ln -s /usr/local/courier-auth/bin/courierauthconfig /usr/bin/courierauthconfig
[root@mail local]# export PATH
[root@mail local]# ln -s /usr/local/courier-auth/bin/courierauthconfig /usr/bin/courierauthconfig
[root@mail local]# export PATH
[root@mail courier-imap-4.0.6]# cp /usr/local/courier-auth/include/courierauth.h
/home/vpopmail/courier-imap-4.0.6/imap/
[root@mail courier-imap-4.0.6]# cp /usr/local/courier-auth/include/courierauthde
bug.h /home/vpopmail/courier-imap-4.0.6/imap/
[root@mail courier-imap-4.0.6]# cp /usr/local/courier-auth/include/courier_auth_config.h /home/vpopmail/courier-imap-4.0.6/imap/
[root@mail courier-imap-4.0.6]# cp /usr/local/courier-auth/include/courierauthsasl.h /home/vpopmail/courier-imap-4.0.6/imap/
[root@mail courier-imap-4.0.6]# cp /usr/local/courier-auth/include/courierauthsaslclient.h /home/vpopmail/courier-imap-4.0.6/imap/
[root@mail courier-imap-4.0.6]# cp /usr/local/courier-auth/include/ltdl.h /home/vpopmail/courier-imap-4.0.6/imap/
[vpopmail@mail courier-imap-4.0.6]$ ./configure --prefix=/usr/local/courier-imap --with-authvchkpw --with-redhat --with-authchangepwdir=/usr/local/courier-auth/libexec/courier-authlib/
[vpopmail@mail courier-imap-4.0.6]$ make
[vpopmail@mail courier-imap-4.0.6]$ make check
下面切換為ROOT用戶
[root@mail courier-imap-4.0.6]# make install
[root@mail courier-imap-4.0.6]# make install-configure
下面修改/usr/local/courier-imap/etc/imapd文件
· 改變 MAXDAEMONS 到 40.
· 改變 MAXPERIP 到 100.
· 改變 TCPDOPTS 為 "-nodnslookup -noidentlookup -user=vpopmail -group=vchkpw".
·改變AUTHMODULES為"authvchkpw"使用vpopmail認證
· 根據個人需要任意改變 IMAP_EMPTYTRASH=Trash:7,Sent:30
· 改變 IMAPDSTART 為YES.
qmailadmin……..
安裝autorespond 自動回復程序,可以很好的與qmailadmin配合使用
[root@mail mail]# tar zxvf autorespond-2.02.tar.gz
[root@mail mail]# cd autorespond-2.0.2
[root@mail autorespond-2.0.2]# ls
autorespond.c help_message Makefile qmail-auto README
[root@mail autorespond-2.0.2]# patch -p1<../autorespond-2.0.4-2.0.5.patch
patching file autorespond.c
Hunk #1 succeeded at 622 (offset 1 line).
Hunk #3 succeeded at 695 (offset 1 line).
[root@mail autorespond-2.0.2]# make
gcc -Wall -o autorespond autorespond.c
[root@mail autorespond-2.0.2]# make install
gcc -Wall -o autorespond autorespond.c
Installing...
cp autorespond /usr/local/bin/autorespond
chown root /usr/local/bin/autorespond
chgrp root /usr/local/bin/autorespond
安裝ezmlm一個快速,強大的郵件列表程序,可以通過qmailadmin對其進行配置
[root@mail ezmlm-0.53]# tar zxvf ezmlm-0.53.tar.gz
[root@mail ezmlm-0.53]# tar zxvf ezmlm-idx-0.42.tar.gz
[root@mail ezmlm-0.53]# cp -rf ezmlm-idx-0.42/* ezmlm-0.53/
[root@mail ezmlm-0.53]# cd ezmlm-0.53
[root@mail ezmlm-0.53]# patch < idx.patch
[root@mail ezmlm-0.53]# chmod u+x makelang
[root@mail ezmlm-0.53]# make
[root@mail ezmlm-0.53]# make man
[root@mail ezmlm-0.53]# make ch_GB
[root@mail ezmlm-0.53]# make setup
安裝qmailadmin通過WEB管理vpopmail域的極好工具
[root@mail qmailadmin-1.2.3]# tar zxvf qmailadmin-1.2.3.tar.gz
[root@mail qmailadmin-1.2.3]# cd qmailadmin-1.2.3
[root@mail qmailadmin-1.2.3]# ./configure --enable-cgibindir=/usr/local/apache2/cgi-bin/ --with-htmllibdir=/var/www/html/ --enable-imagedir=/var/www/html/ --enable-vpopmaildir=/home/vpopmail
下面為輸出信息…..
---------------------------------------
cgi-bin dir = /usr/local/apache2/cgi-bin/
html dir = /var/www/html
image dir = /var/www/html/
image URL = /images/qmailadmin
template dir = /usr/local/share/qmailadmin
qmail dir = /var/qmail
vpopmail dir = /home/vpopmail
autorespond dir = /usr/local/bin
ezmlm dir = /usr/local/bin/ezmlm
ezmlm idx = yes
&nbs
p; mysql for ezmlm = yes
help = no
modify quota = no
domain autofill = no
modify spam check = no
[root@mail qmailadmin-1.2.3]# make
[root@mail qmailadmin-1.2.3]# make install-strip
[root@mail qmailadmin-1.2.3]# cd /usr/local/share/qmailadmin/lang/
[root@mail lang]# ls
bg da de en es fi fr hu it ja nl no pl pt-br ru sk sv tr zh-cn
[root@mail lang]# mv en en.bak
[root@mail lang]# cp zh-cn en
安裝Wmail
[root@mail mail]# tar zxvf wmail-1.00rc1.20030724.tar.gz
[root@mail mail]# cd wmail-1.00rc1.20030724
[root@mail wmail-1.00rc1.20030724]# ./install
默認安裝到/home/wmail目錄下。你也可以通過修改wmail的原代碼目錄中的install文件來修改安裝的目錄和定制編譯參數
配置Wmail
修改/home/wmail/html/zh-cn的index.html和invalid.html相關項為以下內容:<input type="hidden" name="down" value="localhost.com">
修改Apache
編輯apache的httpd.conf文件,在最後加入以下內容:
NameVirtualHost *:80
<VirtualHost *:80>
SetEnv SQWEBMAIL_TEMPLATEDIR /home/wmail/html
ScriptAlias "/cgi-bin/" "/home/wmail/www/cgi-bin/"
<Directory "/home/wmail/www">
AllowOverride All
Options +Includes
</Directory>
ServerAdmin [email protected]
DocumentRoot /home/wmail/www
ServerName mail.localhost.com
</VirtualHost>