qmail邮件系统安装(freebsd 3.4)
敬业的IT人
互联网
佚名
2008-1-3 10:49:33
本系统包括qmail基本系统、vpopmail、webmail。
1。软件准备
软件名称 说明 相关网站
qmail 1.03 qmail 基本系统,须以下三个包 www.qmail.org
ucspi-tcp 0.84 tcpserver
daem
192.168.1.:allow,RELAYCLIENT=""
:allow
For more examples, man tcprules.
After you've created your rules, you need to activate them.
tcpserver works by reading a cdb (database) file. You use the
tcprules program to build the database file from your
/etc/tcp.smtp file. This is accomplished by the following
command:
# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
1.12 rblsmtpd
# PATH=/var/qmail/bin:/usr/local/bin:$PATH
# mkdir /var/lock/qmail-smtpd
# mkdir /var/log/qmail/
# mkdir /var/log/qmail/qmail-smtpd
# supervise /var/lock/qmail-smtpd tcpserver -v
-x/etc/tcp.smtp.cdb -u71 -g1001 0 25
> rblsmtpd qmail-smtpd 2>%26amp;1 | setuser qmaill accustamp |
> setuser qmaill cyclog -s5000000 -n5
/var/log/qmail/qmail-smtpd %26amp;
or, to block using ORBS and
RBL,注意:setuser在freebsd中用setuidgid代替
# supervise /var/lock/qmail-smtpd tcpserver -v
-x/etc/tcp.smtp.cdb -u71 -g1001 0 25
> rblsmtpd rblsmtpd -rrelays.orbs.org qmail-smtpd 2>%26amp;1 |
setuser qmaill accustamp |
> setuser qmaill cyclog -s5000000 -n5
/var/log/qmail/qmail-smtpd %26amp;
1.13 自动运行qmail
1.13.1 inetd方式
smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env
/usr/local/bin/rblsmtpd /var/qmail/bin/qmail-smtpd
1.13.2 xinetd方式
service smtp
{
socket_type = stream
protocol = tcp
wait = no
user = qmaild
server = /var/qmail/bin/tcp-env
server_args = /usr/local/bin/rblsmtpd
/var/qmail/bin/qmail-smtpd
only_from = 0.0.0.0
}
1.13.3 tcpserver 方式
Install the ucspi-tcp package, (
.)
Remove the smtp line from /etc/inetd.conf,
and put the line :
tcpserver -v -u 7770 -g 2108 0 smtp /var/qmail/bin/qmail-smtpd
2>%26amp;1 | /var/qmail/bin/splogger smtpd 3 %26amp;
into your system boot scripts. Replace 7770 with your qmaild
uid, and replace 2108 with your nofiles gid. Don't forget the
%26amp;.
The change will take effect at your next reboot. By default,
tcpserver allows at most 40 simultaneous qmail-smtpd
processes. To raise this limit to 400, use tcpserver -c 400.
To keep track of who's connecting and for how long, run (on
two lines)
1.14 qmail-pop3d
tcpserver [-u uid -g gid] 0 110 /var/qmail/bin/qmail-popup
YOURHOST
/bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir %26amp;
一些重要概念可以参考qmail-howto and 《life with qmail》and qmail-faq
1.15 /usr/local/etc/rc.d/qmail.sh example
#!/bin/sh
csh -cf '/var/qmail/rc %26amp; '
/usr/local/bin/tcpserver -x /etc/tcp.smtp.cdb -u 1004 -g 1003
0 smtp /var/qmail/bin/qmail-smtpd 2>%26amp;1
|/var/qmail/bin/splogger smtpd 3 %26amp;
/usr/local/bin/tcpserver 0 110 /var/qmail/bin/qmail-popup
byone /usr/local/vpopmail/bin/vchkpw
/var/qmail/bin/qmail-pop3d Maildir %26amp;
1.16 checkpassword //如果用vpopmail可以不装
$ make
# make setup check
2. vpopmail
2.1 检查硬盘空间,决定使用哪个slice建立vpopmail用户
# df
or # df -k
2.2 add group and user
# pw groupadd vchkpw
# pw useradd -g vchkpw vpopmail [-d /path/to/home/vpopmail]
2.3 建立 tcp.smtp
2.4 配置安装
$ ./configure --enable-roaming-users=y
$ make
$ su
# make install-strip
3. qmailadmin
3.1 ezmlm
$ make
$ make man
# make setup
3.2 autorespond
gcc -Wall -o autorespond autorespond.c
3.3 qmailAdmin
3.3.1. Before we can make and install there are a few things
to consider..
a. do you have a vpopmail user and installed vchkpw
b. where is your cgibin directory
c. where is your ezmlm directory
d. where is your autorespond directory
If you are missing any one of those you can stop reading this
now and go install it!!
3.3.2 install
$ ./configure --enable-cgibindir={dir} //HTTP server's cgi-bin
directory.
> --with-htmllibdir={dir} // qmailadmin HTML library
directory.
# make
# make install or make install-strip
4 sqwebmail
3.4.1 lynx2-8
$ ./configure
# make
# make install
3.4.2 sqwebmail
$ ./configure --prefix=/usr/local/sqwebmail
> --with-htmllib={dir}
> --enable-cgibindir={dir}
> --enable-mimetypes=filelist //apache mime.types file
$ make
# make check
# make install-strip 或者 make install (不去除debug信息)
5 webmin
# ./setup.sh //按提示做
收藏地址:进入讨论组讨论。
- 最新文章
- FreeBSD 5.3 与 Apache2.0建立列目录[01-03]
- FreeBSD网站平台建设全过程 第一步[01-03]
- FreeBSD FTP 的架设[01-03]
- 理解FreeBSD中的图形界面X系统[01-03]
- FreeBSD下编译升级内核的不同操作手法[01-03]
- 在FreeBSD4.x中制作启动菜单[01-03]
- 相关文章
- FreeBSD 5.3 与 Apache2.0建立列目录[01-03]
- FreeBSD网站平台建设全过程 第一步[01-03]
- FreeBSD FTP 的架设[01-03]
- 理解FreeBSD中的图形界面X系统[01-03]
- FreeBSD下编译升级内核的不同操作手法[01-03]
- 在FreeBSD4.x中制作启动菜单[01-03]
