电信主站 网通分站
购买流程 付款方式 常见问题 在线提问 续租服务 购物车
用户名: 密 码: 忘记密码?
首 页
域名注册
虚拟主机
双线主机
服务器租用
VPS主机
企业邮局
代理专区
客服中心
虚拟主机行业资讯 虚拟主机评测对比 互联网最新动态 技术学院 站长资讯 在线教程 网站运营
搜索优化 服务器 网络编程 图形图象 站长之家 网页制作 操作系统
冲浪宝典 软件教学 视频通信 办公软件 邮件系统 网络安全 认证考试
您当前位置:西部数码->资讯中心-> 在线教程-> 网管专栏
qmail邮件系统安装(freebsd 3.4)-网管专栏,邮件服务
作者:网友供稿 点击:11
  西部数码-全国虚拟主机10强!20余项虚拟主机管理功能,全国领先!第6代双线路虚拟主机,南北访问畅通无阻!虚拟主机可在线rar解压,自动数据恢复设置虚拟目录等.虚拟主机免费赠送访问统计,企业邮局.Cn域名注册10元/年,自助建站480元起,免费试用7天,满意再付款!P4主机租用799元/月.月付免压金!
文章页数:[1] 
本系统包括qmail基本系统、vpopmail、webmail。
1。软件准备
软件名称 说明 相关网站
qmail 1.03 qmail 基本系统,须以下三个包 www.qmail.org
ucspi-tcp 0.84 tcpserver
daemontools 0.61 守护进程
rblsmtpd 0.70
vpopmail 3.4.11 支持虚拟域 www.inter7.com
qmailadmin 0.26e qmail web管理程序,须以下2包
ezmlm 0.53 邮件列表
autorespond 自动回复
sqwebmail 0.31 web mail (next item needed)
lynx-2-8 browser
webmin 0.77 web方式服务器管理(apache,ftp,dns...) www.webmin.com



2。开始安装

1.qmail 1.03

1.1 建立qmail home dir
# mkdir /var/qmail

1.2 添加必要用户,其它系统请参考install.ids
# pw groupadd nofiles
# pw useradd alias -g nofiles -d /var/qmail/alias -s
/nonexistent
# pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent
# pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent
# pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent
# pw groupadd qmail
# pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent
# pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent
# pw useradd qmails -g qmail -d /var/qmail -s /nonexistent

1.3 compile qmail
# make setup check

1.4 compiling rblsmtpd is trivial on most systems:

# tar zxvf rblsmtpd-0.70.tar.gz
# cd rblsmtpd-0.70
# make
# make setup check
//this will produce an rblsmtpd binary in /usr/local/bin.

1.5 config qmail
# cd qmail-1.03
# ./config
if this doesnt work, then youve got some dirty work to do.
read install.ctl. as long as all of your local ips are in
your dns, then you shouldnt have any problems. otherwise you
can do the following:
# ./config-fast your.full.host.name

this will create the necessary files in order to run qmail.

1.6 install the qmail aliases.
# cd ~alias
# echo adam > .qmail-root //adam and bob is system
administrator
# echo bob > .qmail-postmaster
# echo bob > .qmail-mailer-daemon

1.7 建立qmail启动文件,将该行放入/usr/local/etc/rc.d/qmail.sh (csh -cf
...)
# cp /var/qmail/boot/home /var/qmail/rc
// 注意,此时如果打算使用maildir可编辑rc文件,用maildir替换mailbox
# csh -cf /var/qmail/rc &

if youve decided you want to use maildirs, all you need to do
execute the following command in your home directory:
$ /var/qmail/bin/maildirmake $home/maildir
$ echo ./maildir/ > ~/.qmail

1.8 kill sendmail!!

# killall -term sendmail
# mv /usr/lib/sendmail /usr/lib/sendmail.old
# mv /usr/sbin/sendmail /usr/sbin/sendmail.old
# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

1.9 set up qmail daemons.

1.9.1 install daemontools and tcpserver.

# tar zxvf ucspi-tcp-0.84.tar.gz
# cd ucspi-tcp-0.84
# make
# make setup check

1.9.2 installing daemontools is just as easy.
# tar zxvf daemontools-0.53.tar.gz
# cd daemontools-0.53
# make
# make setup check

1.10 now all that is left to do is create the directories that
cyclog will log to.
# mkdir /var/log/qmail
# chown qmaill /var/log/qmail
# mkdir /var/log/qmail/qmail-smtpd
# mkdir /var/log/qmail/qmail-pop3d // if you are also using
qmail-pop3d
# chown qmaill /var/log/qmail/*

1.11 修改/etc/tcp.smtp
before we can start up our qmail smtpd, we need to do some
access control. the simplest way to do this is by using files
in /etc. i use /etc/tcp.smtp as my access control file. if you
dont need to do any access control, /etc/tcp.smtp can have
just one line:
:allow
note that a default configuration does not allow for any
relaying, even from localhost. to allow relaying from
localhost and your local network, you would have to use
something like this:
127.0.0.1:allow,relayclient=""
192.168.1.:allow,relayclient=""
:allow
for more examples, man tcprules.
after youve 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>&1 | setuser qmaill accustamp |
> setuser qmaill cyclog -s5000000 -n5
/var/log/qmail/qmail-smtpd &

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>&1 |
setuser qmaill accustamp |
> setuser qmaill cyclog -s5000000 -n5
/var/log/qmail/qmail-smtpd &

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, (
http://pobox.com/~djb/ucspi-tcp.html.)
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>&1 | /var/qmail/bin/splogger smtpd 3 &

into your system boot scripts. replace 7770 with your qmaild
uid, and replace 2108 with your nofiles gid. dont forget the
&.

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 whos 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 &

一些重要概念可以参考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 &
/usr/local/bin/tcpserver -x /etc/tcp.smtp.cdb -u 1004 -g 1003
0 smtp /var/qmail/bin/qmail-smtpd 2>&1
|/var/qmail/bin/splogger smtpd 3 &

/usr/local/bin/tcpserver 0 110 /var/qmail/bin/qmail-popup
byone /usr/local/vpopmail/bin/vchkpw
/var/qmail/bin/qmail-pop3d maildir &

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 cgi bin 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 servers 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 //按提示做
文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
相关主题
文章页数:[1] 
Google
热门文章
·如何查看本机打开的端口是被哪个程序使用的-网管专栏,操作系统
·如何在多台电脑上同时安装Windows-网管专栏,操作系统
·网管人员必备的网络命令(转贴)-数据库专栏,SQL Server
·Postfix + Courier-IMAP + Cyrus-SASL + MySQL + IMP完全指南(新版)-网管专栏,邮件服务
·一个IP建多个Web站点--主机头名法-网管专栏,WEB服务
·WinXP/2003网络服务详解-网管专栏,操作系统
·电信网管中的Java客户端(二)-JSP教程,Java技巧及代码
·Resin在Windows系统下的安装-网管专栏,WEB服务
·在Win2k3下配置Apache+php+mysql-网管专栏,WEB服务
·服务器配置SSL-网管专栏,操作系统

最新文章
·如何查看本机打开的端口是被哪个程序使用的-网管专栏,操作系统
·服务器配置SSL-网管专栏,操作系统
·一个IP建多个Web站点--主机头名法-网管专栏,WEB服务
·如何在多台电脑上同时安装Windows-网管专栏,操作系统
·Linux内核技术分析-网管专栏,操作系统
·在Win2k3下配置Apache+php+mysql-网管专栏,WEB服务
·在Redhat Enterprise AS 3 下源码安装配置 MONO-网管专栏,WEB服务
·网管人员必备的网络命令(转贴)-数据库专栏,SQL Server
·WinXP/2003网络服务详解-网管专栏,操作系统
·Apache安装设置-网管专栏,WEB服务




版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!

特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。
  打印  刷新  关闭
返回首页 |关于我们 | 联系我们 | 付款方式 | 创业联盟 | 虚拟主机 | 资讯中心 | 友情链接 | 网站地图

版权所有 西部数码(www.west263.com)
CopyRight (c) 2002~2006 west263.com all right reserved.
公司地址:四川成都市万和路90号天象大厦4楼 邮编:610031
电话总机:028-86262244 86263048 86263408 86263960 86264018 86267838
售前咨询:总机转201 202 203 204 206 208
售后服务:总机转211 212 213 214
财务咨询:总机转224 223 传真:028-86264041 财务QQ:点击发送消息给对方635483282
售前咨询QQ:点击发送消息给对方2182518 点击发送消息给对方241975952 点击发送消息给对方275026793 点击发送消息给对方408235859
售后服务QQ:点击发送消息给对方17708515 点击发送消息给对方307742704 点击发送消息给对方287976517 点击发送消息给对方363783715
《中华人民共和国增值电信业务经营许可证》编号:川B2-20030065号