Chinaunix首页 | 论坛 | 博客
  • 博客访问: 370704
  • 博文数量: 83
  • 博客积分: 2213
  • 博客等级: 大尉
  • 技术积分: 835
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-16 20:26
文章分类

全部博文(83)

文章存档

2015年(1)

2012年(1)

2011年(14)

2007年(20)

2006年(47)

我的朋友

分类:

2006-04-18 12:54:13

随着互联网的飞速发展,电子邮件已经成为人们生活中必不可少的通信工具。架设邮件系统相对来说比较的麻烦些,在网上有很多的相关资料可以查阅。真的很感谢这么多热于奉献的网友,使这个网络更加的强大。一直以来都想架设自己的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

――――――inetdwinetd的代替品,用它来监听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

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 nofiles -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*

下载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: warning: 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/lib/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 dht@china-yr.com

Please enter password for dht@china-yr.com:

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: === 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的包.  这个地方来下载..

 

安装: 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] 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 before 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

   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-cnindex.htmlinvalid.html相关项为以下内容: 
    

修改Apache 

    编辑apachehttpd.conf文件,在最后加入以下内容:

    NameVirtualHost *:80

  
      SetEnv SQWEBMAIL_TEMPLATEDIR /home/wmail/html
      ScriptAlias "/cgi-bin/" "/home/wmail/www/cgi-bin/"
   
       AllowOverride All
       Options +Includes
   

      ServerAdmin

      DocumentRoot /home/wmail/www
      ServerName mail.localhost.com


   


 

 

阅读(4039) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~