博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

东山新

坚果果,别乱跑,乖哦...
  szxsztszk.cublog.cn

关于作者
姓名:东山新
职业:守护
年龄:两位数(目前)
个性介绍:简洁
|| << >> ||
我的分类


Centos4+Postfix2+Dovecot0.9+SASL2+Openwebmail+Clam
实验环境:
    网络域名:51test.com
    DNS主机名称:mail.51test.com
    DNS主机IP地址:192.168.1.233
    邮件主机名称:mail.51test.com
    邮件主机IP地址:192.168.1.233
    操作系统:centos4.3
    不启动SELinux服务:
1、DNS服务器的配置:
  dns: mail.51test.com
  MX: mail.51test.com
2、安装所需要的软件清单:
    postfix-2.2.5-3.rhel4.rpm
    postfix-pflogsumm-2.1.5-4.2.rhel4.rpm ---〉没装?
    cyrus-sasl-2.1.19-5.rhel4.i386.rpm
    dovecot-0.99.11-2.rhel4.1.rpm
    httpd-2.0.52-12.ent.rpm
    perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm
    perl-suidperl-5.8.5-12.1.1.i386.rpm
    perl-Compress-Zlib-1.34-1.2.el4.rf.i386.rpm
    perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm
    perl-5.8.5-12.1.i386.rpm---〉没装
    openwebmail-2.51-1.i386.rpm
   
3、postfix的安装过程:
   4.3自带.已经装了.
4、启动postfix + dovecot服务过程:
    # service postfix start
    Starting postfix:                             [ 确定 ]
    # service dovecot start
    启动 Dovecot Imap:                         [ 确定 ]
   
5、修改/etc/dovecot.conf文件:
    #protocols = imap imap3
    更改为:
    protocols = imap imap3 pop3 pop3s (启动imap imap3 pop3 pop3s功能)
    # service dovecot restart(重新启动dovecot服务)
    停止 Dovecot Imap:                           [ 确定 ]
    启动 Dovecot Imap:                           [ 确定 ]
   
6.1修改/etc/postfix/main.cf文件:
    #myhostname = host.domain.tld
    更改为:
    myhostname = mail.51test.com (指定运行Postfix邮件系统的主机名称)
    #mydomain = domain.tld
    更改为:
    mydomain = 51test.com (指定Postfix邮件系统使用的域名比例:easy.com)
   
    #myorigin = $mydomain
    更改为:
    myorigin = 51test.com (指定发件人所在的域名比例:easy.com)
   
    #inet_interfaces = all
    更改为:
    Inet_interfaces =all (指定Postfix邮件系统监视的网络接口)
   
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain,
www.$mydomain, ftp.$mydomain
    更改为:
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain,
www.$mydomain, ftp.$mydomain (指定Postfix接收邮件时收件人的域名)
    
relay_domains = $mydestination  ← 变为此状态,定义允许转发的域名
#mynetworks = 168.100.189.0/28, 127.0.0.0/8  ← 找到此行,依照自己的内网情况修改
 ↓
mynetworks = 192.168.1.0/24, 127.0.0.0/8  ← 变为此状态,指定内网和本地的IP地址范围
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)  ← 找到这一行,接此行添加如下行:
smtpd_banner = $myhostname ESMTP unknow  ← 添加这一行,不显示SMTP服务器的相关信息
在配置文件的文尾,添加如下行:
#SASL SMTP验证
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated ,
 reject_non_fqdn_sender,
 reject_unknown_sender_domain,
 reject_unknown_recipient_domain,
 reject_non_fqdn_recipient,
 reject_unauth_destination
smtpd_client_restrictions = permit_sasl_authenticated
 
6.2 配置SMTP认证的相关选项
[root@sample ~]# vi /usr/lib/sasl2/smtpd.conf 
pwcheck_method: saslauthd
log_level:3
mech_list:PLAIN LOGIN
[root@sample ~]# vi /etc/sysconfig/saslauthd
FLAGS=pam   ← 定义认证方式为pam

6.3关闭sendmail服务及设置默认MTA
因为在用Postfix作为SMTP服务器的前提下,我们不准备再用sendmail,所以将sendmail服务关掉,以确保安全及节省系统资源。
[root@sample ~]# /etc/rc.d/init.d/sendmail stop  ← 关闭sendmail服务
Shutting down sendmail:         [ OK ]
Shutting down sm-client:         [ OK ]
[root@sample ~]# chkconfig sendmail off  ← 关闭sendmail自启动
[root@sample ~]# chkconfig --list sendmail  ← 确认sendmail自启动已被关闭(都为off就OK)
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off

6.4然后再将默认的MTA设置为Postfix。
[root@sample ~]# alternatives --config mta  ← 设置默认MTA
There are 2 programs which provide 'mta'.
Selection Command
-----------------------------------------------
*+ 1 /usr/sbin/sendmail.sendmail  ← 当前状态:sendmail为默认MTA
 2 /usr/sbin/sendmail.postfix

Enter to keep the current selection[+], or type selection number: 2  ← 在这里输入2,使Postfix成为默认MTA

6.5最后,启动SMTP认证及Postfix服务,并设置相应服务为自启动。
[root@sample ~]# chkconfig saslauthd on  ← 将SMTP-Auth设置为自启动
[root@sample ~]# chkconfig --list saslauthd  ← 确认SMTP-Auth服务状态
saslauthd 0:off 1:off 2:on 3:on 4:on 5:on 6:off  ← 确认2~5为on的状态就OK
[root@sample ~]# /etc/rc.d/init.d/saslauthd start  ← 启动SMTP-Auth
Starting saslauthd:           [ OK ]
[root@sample ~]# chkconfig postfix on  ← 将Postfix设置为自启动
[root@sample ~]# chkconfig --list postfix  ← 确认Postfix服务状态
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off  ← 确认2~5为on的状态就OK
[root@sample ~]# /etc/rc.d/init.d/postfix start  ← 启动Postfix
Starting postfix:            [ OK ]
至此,就完成了SMTP服务器方面的配置.

7、端口测试:
#telnet localhost 25
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
220 gdgz51.3322.org ESMTP Postfix
ehlo localhost
250-gdgz51.3322.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN <----认证OK
250-AUTH=LOGIN PLAIN
250 8BITMIME
quit
221 Bye
Connection closed by foreign host.

# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
+OK dovecot ready.
user szj
+OK
pass xdfsdf
+OK Logged in.
list
+OK 0 messages:
.
quit
+OK Logging out.
Connection closed by foreign host.
 
8、安装openwebmail 2.51软件:
    # service httpd restart (启动httpd服务)
    停止 httpd:                               [ 确定 ]
    启动 httpd:                               [ 确定 ]
   
    # rpm -ivh perl-5.8.5-12.1.i386.rpm --->没装?
    # rpm -ivh perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm
    # rpm -ivh perl-Compress-Zlib-1.34-1.2.el4.rf.i386.rpm
    # rpm -ivh perl-suidperl-5.8.5-12.1.1.i386.rpm
    # rpm -ivh perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm
   
# rpm -ivh openwebmail-2.51-1.i386.rpmwarning: openwebmail-2.51-1.i386.rpm: V3 DSA signature: NOKEY, key ID
cfb164d8
    Preparing...   ######################################### [100%]
    1:openwebmail   ###################################### [100%]
       
    # cd /var/www/cgi-bin/openwebmail/
    # ./openwebmail-tool.pl --init
   
9、修改 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf 文件:
   
    domainnames       auto
    更改为:
    domainnames       51test.com (更改为自己定义的域名)
   
    default_language         en
    更改为:
    default_language     zh_CN.GB2312 (更改为简体中文版介面)
   
    default_iconset     Cool3D.Englist
    更改为:
    default_iconset     Cool3D.Chinese.Simplified (更改为中文3D按键)
10、修改/var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf文件:
    smtpserver           127.0.0.1
    更改为:
    smtpserver           192.168.1.223 (更改smtp服务器的地址)
   
    authpop3_server           localhost
    更改为:
    authpop3_server           192.168.1.223 (更改pop3服务器的地址)
   
11、修改/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf文件:
   
    dbmopen_ext       none
    更改为:
    dbmopen_ext       .db
   
    dbmopen_haslock     no
    更改为:
    dbmopen_haslock     yes
   
    smtpserver         192.168.1.223 (添加smtp服务器的地址)
   
12.1继续运行openwebmail-tool.pl文件:
    # ./openwebmail-tool.pl --init
  
    Send the site report?(Y/n) y (输入y,然后按回车键)
  
12.2
添加系统用户和密码
   #useradd -s /sbin/nologin szjj
   #passwd szjj
13.扩展功能(可以不做):
1).增加限制用户发送电子邮的权限:
    用户权限说明:
    Fandy不受发送限制(可以无限制的发送和接收Interanl、internet的电子邮件);
    Yer、Biao受到发送限制(只可以发送和接收Internal内的电子邮件);
   
    # useradd fandy(增加本地用户:fandy)
    # useradd yer(增加本地用户:yer)
    # useradd biao(增加本地用户:biao)
   
    # passwd yer(设置本地yer用户的密码)
    Changing password for user yer.
    New UNIX password:
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.
   
    # passwd fandy(设置本地fandy用户的密码)
    Changing password for user fandy.
    New UNIX password:
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.
   
    # passwd biao(设置本地biao用户的密码)
    Changing password for user biao.
    New UNIX password:
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.
   
    在main.cf文件中增加以下的代码:
   
    # restrictions
    smtpd_restriction_classes = local_only
    local_only = check_recipient_access hash:/etc/postfix/local_domains, reject
    smtpd_recipient_restrictions =check_sender_access
hash:/etc/postfix/local_senderspermit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_sender,reject_non_f
qdn_recipient,reject_unauth_destination,reject_unauth_pipelining,reject_invalid_hostname
   
    在/etc/postfix/目录下建立local_senders文件,内容如下:
   
   
yer@51test.com     local_only
   
biao@51test.com   local_only
   
    在/etc/postfix/目录下建立local_domains文件,内容如下:
   
    51test.com         OK
    mail.51test.com     OK
   
    为local_senders、local_domains两个文件建立hash:
   
    # postmap hash:/etc/postfix/local_senders
    # postmap hash:/etc/postfix/local_domains
   
    当
yer@51test.combiao@51test.com两个用户向其它域发送邮件时会出现以下的
    错误信息:
    554 5.7.1 <
yer@easy.com>: Sender address rejected: Access denied
    554 5.7.1 <
biao@easy.com>: Sender address rejected: Access denied
   
14。打开服务器的110和25端口
如果对外有防火墙或者路由器,也要把它们的110和25口对外打开,否则会收不到信.
15.Postfix安装笔记2之防毒,过滤篇
15.1.下载MailScanner, ClamAV 0.88
#wget http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/rpm/MailScanner-4.51.5-1.rpm.tar.gz
#wget http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz
 
# tar -zxvf MailScanner-4.51.5-1.rpm.tar.gz
#tar -zxvf install-Clam-SA.tar.gz
# cd MailScanner-4.51.5-1
# ./install.sh
# cd install-Clam-SA
# ./install.sh
注: 这两步的过程比较长,可以先泡杯茶…….
15.2.配置:
vi /etc/mail/spamassassin/init.pre
激活下面两个插件(去掉前面的 # ):
loadplugin Mail::SpamAssassin::Plugin::DCC  ???
loadplugin Mail::SpamAssassin::Plugin::Razor2
# vi /etc/MailScanner/MailScanner.conf
修改下面几项:
Run As User = postfix
Run As Group = postfix
MTA = postfix
%org-name% = yayaa.net
%org-long-name% = YY
%web-site% =
www.yayaa.net

确保下面几项正确:
Incoming Queue Dir = /var/spool/mqueue.in
Outgoing Queue Dir = /var/spool/mqueue
Virus Scanners = auto
Use SpamAssassin = yes

#mkdir /var/spool/mqueue
#chown postfix:postfix /var/spool/mqueue
#chown postfix:postfix /var/spool/MailScanner/incoming
#chown postfix:postfix /var/spool/MailScanner/quarantine
#chown -R postfix:postfix /var/spool/mqueue.in
#chown –R postfix:postfix /var/spool/postfix

开机自启动:
#chkconfig spamassassin on
#service spamassassin restart
#chkconfig postfix off
# chkconfig MailScanner on

15.3.定时自动更新
使用CCERT 中文垃圾邮件过滤规则集Chinese_rules.cf
#wget -N -P /usr/share/spamassassin
www.ccert.edu.cn/spam/sa/Chinese_rules.cf
定时更新:SA
# crontab –e
0 0 1 * * wget -N -P /usr/share/spamassassin
www.ccert.edu.cn/spam/sa/Chinese_rules.cf;/etc/init.d/spamassassin restart;/etc/init.d/spamassassin restart
# sa-learn --sync -D -p user_prefs (建立学习系统)
#sa-learn --dump all(查看自学习的数据信息)
定时更新:ClamAV
#vi /usr/local/etc/freshclam.conf
去掉下面几句前面的 #
UpdateLogFile /var/log/freshclam.log
LogSyslog
PidFile /var/run/freshclam.pid
#vi /usr/local/etc/clamd.conf
LogFile /var/log/clamav/clamd.log 
LogFileMaxSize 2M 
LogTime
PidFile /var/run/clamd.pid
LogSyslog
ScanMail
#touch /var/log/freshclam.log
#chmod 644 /var/log/freshclam.log
#chown clamav:clamav /var/log/freshclam.log 
#mkdir /var/log/clamav
#touch /var/log/clamav/clamd.log
#chown –R clamav:clamav /var/log/clamav
#chmod –R 644 /var/log/clamav
#crontab –e
0 1 * * * freshclam --quiet -l /var/log/freshclam.log

15.4.重新启动,测试
#reboot
#tail –f /var/log/maillog |grep MailScanner

16、测试webmail方式收发电子邮件:
    在ie中输入以下地址:
   
http://192.168.1.223/cgi-bin/openwebmail/openwebmail.pl
17。用OUTLOOK或者FOXMAIL测试。
    选中”我的服务器要求身份验证“
    自己给自己写封信,发,再收。测试。
    给外网的邮箱发信,再回复。测试。
 

发表于: 2007-05-28,修改于: 2007-06-16 21:22,已浏览2261次,有评论19条 推荐 投诉


网友评论
网友: 本站网友 时间:2007-05-30 10:52:29 IP地址:218.19.10.★
Openwebmail + spamassassin 擋垃圾信的設定方法
http://www.neo.com.tw/archives/000339.html


openwebmail 主页
http://turtle.ee.ncku.edu.tw/~tung/openwebmail/

网友: 本站网友 时间:2007-05-30 12:17:06 IP地址:218.19.10.★
防止垃圾邮件功能:spam
http://turtle.ee.ncku.edu.tw/openwebmail/download/redhat/howto/spam/

防止病毒功能:clamav
http://turtle.ee.ncku.edu.tw/openwebmail/download/redhat/howto/virus/ClamAV/



网友: 本站网友 时间:2007-05-30 12:22:19 IP地址:218.19.10.★
Postfix+Openwebmail+虛擬帳號 On Mandrake 9.2
http://blog.chinaunix.net/u/2389/showart_44055.html

网友: 本站网友 时间:2007-05-30 12:51:27 IP地址:218.19.10.★
防止图片变化的垃圾邮件:
Greylist的安装[Postfix+FC4]
http://blog.chinaunix.net/u/2389/showart_189876.html

网友: 本站网友 时间:2007-06-14 15:40:43 IP地址:219.137.205.★
没有SASL认证

网友: 本站网友 时间:2007-06-15 22:56:53 IP地址:219.137.233.★
文章已经修改。有验证了。

网友: 本站网友 时间:2007-06-16 12:06:30 IP地址:219.137.233.★
安装查毒时出现下面的情况:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en",
        LC_ALL = (unset),
        LANG = "en"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

网友: 本站网友 时间:2007-06-16 20:16:29 IP地址:219.137.233.★
ISP级别MAIL系统:
CENTOS(基本系统) + Postfix(MTA 邮件传输代理) + MySQL(后台数据库,用户保存用户信息) + Cyrus -SASL2(发信认证) + Courier -IMAP(提供POP3/IMAP服务) + MailDrop(MDA 邮件投递代理) + amavisd-new(内容过滤) + Spamassassin(反垃圾邮件) + Clamav(杀毒) +  后台用户管理 + 高效率的webmail 

网友: 本站网友 时间:2007-06-16 21:07:45 IP地址:219.137.233.★
功能模块 内容 备注 

操作系统(OS)     
CentOS 4.3                  CentOS和RHEL是一样的,而且升级免费 

Web 服务器 Apache 2.0.x CentOS 自带 

邮件传输代理(MTA)
 Postfix 2.3snapshot        使用2.3 snapshot,虽然不是最新但是对一般人而言足够用了 

数据库/目录服务 
MySQL 4.1       可选openLDAP或NetScape LDAP,本文以MySQL为蓝本 

邮件投递代理(MDA) 
maildrop 2.0.x            支持过滤和强大功能 

Web帐户管理后台 
ExtMan 0.16-pre1         支持无限域名、无限用户 

POP3 服务器 
Courier-IMAP         只使用pop3部分,对于大部分企业而言完全足够 

WebMail 系统 
ExtMail 0.24-pre8           支持多语言、全部模板化,功能基本齐全 

防病毒软件(Anti-Virus) 
ClamAV 0.88          最热门的开源杀毒软件 

SMTP阶段反垃圾邮件工具 
Spam Locker 0.083      基于SMTP行为识别的Antispam软件,大量可选插件 

内容过滤器 
Amavisd-new 2.40        Content-Filter软件,支持与clamav/sa的挂接 

内容级别的反垃圾邮件工具 
SpamAssassin          著名的SA,可以支持大量规则,但速度慢 

SMTP认证库 
Cyrus SASL 2.1x       标准的SASL实现库,可以支持Courier authlib 

其他数据认证库 
Courier Authlib 0.57        authlib是maildrop, courier-imap等服务的关键部件 

日志分析及显示 
mailgraph_ext        在ExtMan中已经包含了 

网友: 本站网友 时间:2007-06-16 22:55:08 IP地址:219.137.233.★
# 1. 網路硬碟:
如果不想提供網路硬碟的話,可以在底下的檔案:
/var/www/cgi-bin/openwebmail/etc/openwebmail.conf
加入這行:
enable_webdisk no

# 2. 提供 ssh 連線:
如果不想提供網路連線的話,可以在底下的檔案:
/var/www/cgi-bin/openwebmail/etc/openwebmail.conf
加入這行:
enable_sshterm no

# 3. 讓登入更簡單:
如果不想在網址列輸入長長的一段文字,可以修改成為:
vi httpd.conf (請依照您的系統來修訂!)
ScriptAlias  /webmail     /var/www/cgi-bin/openwebmail/openwebmail.pl
or
ScriptAlias  /webmail.pl  /var/www/cgi-bin/openwebmail/openwebmail.pl
然後重新啟動 apache ,如此一來,您可以在網址列輸入:
http://hostname/webmail or http://hostname/webmail.pl
就可以進入 openwebmail 囉!


网友: 本站网友 时间:2007-06-17 00:04:19 IP地址:219.137.233.★
openwebmail的自动回信功能无法使用。
在普通用户的设置里选了自动回信保存后,就无法接信了。???

网友: 本站网友 时间:2007-06-18 23:31:15 IP地址:219.137.233.★
CU:下面文章可以用虚拟用户+后台管理。
redhat9+postfix+cyrus-sasl+mysql+postfixadmin+courier-imap+courier-maildrop+squirrelmail(courier-sqwebmail openwebmail)+clamav+spamassassin+amavisd-new

网友: 本站网友 时间:2007-07-03 16:21:27 IP地址:219.137.205.★
杀毒的设置有问题.

网友: szxsztszk 时间:2007-07-05 18:34:25 IP地址:219.137.205.★
Matthew(黑夜编码人) < matthew@cnfug.org >
@ 2004/10/16

一、安装软件系统

1)、安装MySQL4.0.x

为了与系统的软件系统区分开,这里将所有我们手动编译的服务器(DAEMON)软件安装在/usr/server中。
$ tar -zxvf mysql-4.0.21.tar.gz
$ cd mysql-4.0.21
$ ./configure --prefix=/usr/server/mysql --localstatedir=/usr/server/mysql/db --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysql --with-charset=gb2312 --with-extra-charsets=all
$ make
# make install
接下来安装mysql数据库
# scripts/mysql_install_db
# chown -R mysql:mysql /usr/server/mysql/db
最后需要设置mysql的root口令
# /usr/server/mysql/bin/mysqld_safe &
# /usr/server/mysql/bin/mysqladmin -uroot password 'your_password_goes_here'
口令设置完成后,暂时关闭mysql服务:
# kill %1


2)、安装Cyrus-sasl2

因为要查询MySQL数据库,所以我们需要在编译cyrus-sasl2时加上对MySQL的支持,同时我们打开了对plain和login两种验证方式的支持:
$ tar -zxvf cyrus-sasl-2.1.19.tar.gz
$ cd cyrus-sasl-1.2.19
$ ./configure --disable-anon -enable-plain --enable-login --enable-sql --with-mysql=/usr/server/mysql --with-mysql-includes=/usr/server/mysql/include/mysql --with-mysql-libs=/usr/server/mysql/lib/mysql
$ make
# make install
按照sasl的安装说明,需要建立一个symblink:
# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2


3)、安装Postfix2.1.x

首先,按照postfix的安装说明,建立postfix、postdrop组和postfix用户:
# pw groupadd postfix
# pw groupadd postdrop
# pw useradd postfix -g postfix -G postdrop
用户和组建立好后,我们就可以开始编译Postfix了:
$ tar -zxvf postfix-2.1.4.tar.gz
$ cd postfix-2.1.4
$ make tidy
$ make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/server/mysql/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/server/mysql/lib/mysql -lmysqlclient -lm -lz -L/usr/local/lib -lsasl2'
$ make
# make install
在执行make install的时候可能会得到如下的提示(如果没有就不用理会了:p):
/usr/libexec/ld-elf.so.1: Shared object "libmysqlclient.so.12" not found
这是因为我们的mysql不是安装在默认目录中的,所以需要告诉postfix应该到哪里去找libmysqlclient.so.12,使用ldconfig就可以达到这个目的:
# ldconfig -m /usr/server/mysql/lib/mysql
然后再执行make install这里会出现很多问题,但postfix已经为我们设置好了默认的答案,直接使用这些答案就可以使postfix正常工作了,所以我们只要直接按回车就可以了。

到这里,支持mysql和sasl认证的postfix就已经安装成功了。


4)、安装Courier-imap

$ tar -jxvf courier-imap-3.0.7.tar.bz2
$ cd courier-imap-3.0.7
$ ./configure --prefix=/server/courier-imap --with-authmysql
在执行configure的时候有可能会出现如下的错误提示:
configure: error: --with-authmysql specified but no mysqlclient.so
configure: error: /usr/local/bin/bash './configure' failed for authlib
这是因为courier-imap会使用mysql_config来取得一些编译参数(include、libs、cflags、socket等),但我们是将mysql安装在非/usr/local中,所以默认的PATH就不起作用,需要我们来使courier-imap能够搜索到mysql_config:
$ export PATH="$PATH:/usr/server/mysql/bin"
然后再次执行configure脚本:
$ ./configure --prefix=/server/courier-imap --with-authmysql
$ make
# make install


二、配置系统

1)、建立用户数据表结构

这里,我们直接使用postfixadmin-2.0.5的表结构,现在我们来解开postfixadmin:
$ tar -zxvf postfixadmin-2.0.5.tgz
$ cd postfixadmin-2.0.5
在postfixadmin-2.0.5.tgz中有一个DATABASE.TXT文件,其中描述了各个表的结构,它的内容如下:
#############################
# Postfix Admin Release 2.x #
#############################
#
# Copyright (c) 2002, 2003, 2004 High5!
# Created by: Mischa Peters 
#
# This is the complete database structure for Postfix Admin.
# If you are installing from scratch you can use this file otherwise you
# need to use the TABLE_CHANGES.TXT or TABLE_BACKUP_MX.TXT that comes with Postfix Admin.
#
# There are 2 entries for a database user in the file.
# One you can use for Postfix and one for Postfix Admin.
#
# If you run this file twice (2x) you will get an error on the user creation in MySQL.
# To go around this you can either comment the lines below "USE MySQL" until "USE postfix".
# Or you can remove the users from the database and run it again.
#
# You can create the database from the shell with:
#
# mysql -u root [-p] < DATABASE.TXT

#
# Postfix / MySQL
#
USE mysql;
# Postfix user & password
INSERT INTO user (Host, User, Password) VALUES ('localhost','postfix',password('postfix'));
INSERT INTO db (Host, Db, User, Select_priv) VALUES ('localhost','postfix','postfix','Y');
# Postfix Admin user & password
INSERT INTO user (Host, User, Password) VALUES ('localhost','postfixadmin',password('postfixadmin'));
INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('localhost', 'postfix', 'postfixadmin', 'Y', 'Y', 'Y', 'Y');
FLUSH PRIVILEGES;
GRANT USAGE ON postfix.* TO postfix@localhost;
GRANT SELECT, INSERT, DELETE, UPDATE ON postfix.* TO postfix@localhost;
GRANT USAGE ON postfix.* TO postfixadmin@localhost;
GRANT SELECT, INSERT, DELETE, UPDATE ON postfix.* TO postfixadmin@localhost;
CREATE DATABASE postfix;
USE postfix;

#
# Table structure for table admin
#
CREATE TABLE admin (
username varchar(255) NOT NULL default '',
password varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (username),
KEY username (username)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Admins';

#
# Table structure for table alias
#
CREATE TABLE alias (
address varchar(255) NOT NULL default '',
goto text NOT NULL,
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (address),
KEY address (address)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases';

#
# Table structure for table domain
#
CREATE TABLE domain (
domain varchar(255) NOT NULL default '',
description varchar(255) NOT NULL default '',
aliases int(10) NOT NULL default '-1',
mailboxes int(10) NOT NULL default '-1',
maxquota int(10) NOT NULL default '-1',
transport varchar(255) default NULL,
backupmx tinyint(1) NOT NULL default '0',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (domain),
KEY domain (domain)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Domains';

#
# Table structure for table domain_admins
#
CREATE TABLE domain_admins (
username varchar(255) NOT NULL default '',
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
KEY username (username)
) TYPE=MyISAM COMMENT='Postfix Admin - Domain Admins';

#
# Table structure for table log
#
CREATE TABLE log (
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
username varchar(255) NOT NULL default '',
domain varchar(255) NOT NULL default '',
action varchar(255) NOT NULL default '',
data varchar(255) NOT NULL default '',
KEY timestamp (timestamp)
) TYPE=MyISAM COMMENT='Postfix Admin - Log';

#
# Table structure for table mailbox
#
CREATE TABLE mailbox (
username varchar(255) NOT NULL default '',
password varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
maildir varchar(255) NOT NULL default '',
quota int(10) NOT NULL default '-1',
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (username),
KEY username (username)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Mailboxes';

#
# Table structure for table vacation
#
CREATE TABLE vacation (
email varchar(255) NOT NULL default '',
subject varchar(255) NOT NULL default '',
body text NOT NULL,
cache text NOT NULL,
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (email),
KEY email (email)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Vacation';

现在将表结构导入到mysql中:
$ /usr/server/mysql/bin/mysql -u root -p < DATABASE.TXT


2)、配置postfix

首先需要更改/etc/postfix/main.cf中的一些基本参数,请按照自己的实际情况修改,本例以域名cnfug.org为例:
myhostname = mail.cnfug.org
mydomain = cnfug.org
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost  (这里没有使用$mydomain是因为我们将使用virtualhost)
inet_interfaces = all
在设置好以上基本参数后就需要设置支持virtualhost了,在本例中我们将所有的邮件全部存放在/var/mailbox中,同时因为iGENUS要在用户邮箱目录(Maildir)中建立文件和存放信息,所以就要求web服务器的用户要对用户邮箱目录有写的权限,所以我们在这里就将用户邮箱的uid和gid设置成web服务器的uid和gid以确保iGENUS正常工作,本例中web服务器的uid和gid都为80。在/etc/postfix/main.cf中加入:
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_mailbox_domains.cf
virtual_mailbox_base = /var/mailbox/
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_mailbox_maps.cf
virtual_minimum_uid = 80
virtual_uid_maps = static:80
virtual_gid_maps = static:80
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_alias_maps.cf
虚拟域名支持的配置比较简单,根据字意就可以看明白,不过有一点需要注意,/var/mailbox/最后的"/"字符不能省略。
在设置好虚拟域名的基本参数后,就需要设置每个MySQL查询配置文件了,我们将所有的MySQL查询配置文件统一存放在/etc/postfix/mysql中,每个查询配置文件的内容分别如下:
(1) /etc/postfix/mysql/mysql_mailbox_domains.cf
user = postfix
password = postfix
dbname = postfix

table = domain
select_field = domain
where_field = domain
additional_conditions = and active='1'

(2) /etc/postfix/mysql/mysql_mailbox_maps.cf
user = postfix
password = postfix
dbname = postfix

table = mailbox
select_field = maildir
where_field = username
additional_conditions = and active='1'

(3) /etc/postfix/mysql/mysql_alias_maps.cf
user = postfix
password = postfix
dbname = postfix

table = alias
select_field = goto
where_field = address
additional_conditions = and active='1'


接下来开启sasl认证(为了与旧的MUA兼容所以加入broken_sasl_auth_clients的支持),在/etc/postfix/main.cf中加入:
smtpd_sasl_auth_enable = yes
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = cnfug.org
smtpd_recipient_restrictions = reject_unauth_destination

接下来设置alias_maps,在/etc/postfix/main.cf中加入:
alias_maps = hash:/etc/postfix/aliases
现在用postalias生成aliases.db
# cd /etc/postfix
# postalias aliases

最后就是建立/var/mailbox目录:
# mkdir /var/mailbox
# chown -R www:www /var/mailbox

3)、配置sasl认证

在配置postfix的时候,我们设置了postfix使用的sasl配置文件为smtpd,所以现在我们需要配置sasl让它知道怎么从MySQL中读取认证信息:
# vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: auxprop
mech_list: plain login
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: localhost
sql_user: postfix
sql_passwd: postfix
sql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username='%u@%r' and domain='%r' and active='1'
上面的选项中根本字意就可以了解它的意思,其中sql_select中的%u表示是用户名,%r表示是realm,通常为用户的域名(如果用户名中没有包含域名,则默认为服务器的域名),因为postfixadmin生成的用户名是user@domain.ltd的形式,而非标准的user形式,所以我们需要设置WHERE语句为username='%u$%r'即'用户名@域名'。


4)、配置courier-imap

要让courier-imap能够正确的读取MySQL中的认证信息,就需要配置authmysql的配置文件/usr/server/courier-imap/etc/authmysqlrc,本例中其内容如下:
MYSQL_SERVER localhost
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_DATABASE postfix

MYSQL_USER_TABLE mailbox

MYSQL_LOGIN_FIELD username
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD '80'
MYSQL_GID_FIELD '80'
MYSQL_HOME_FIELD '/var/mailbox/'
MYSQL_MAILDIR_FIELD maildir
MYSQL_NAME_FIELD name
MYSQL_QUOTA_FIELD quota
MYSQL_WHERE_CLAUSE active='1'
同postfix中的配置一样,/var/mailbox/最后的"/"字符不能省略。

接下来配置authdaemonrc:
# cp /usr/server/courier-imap/etc/authdaemonrc.dist /usr/server/courier-imap/etc/authdaemonrc
因为我们这里只使用了authmysql模块,所以我们可以把其它验证模块去掉,编辑authdaemonrc文件,将其中的:
authmodulelist="authcustom authcram authuserdb authmysql authpam"
改成:
authmodulelist="authmysql"
最后就是配置pop3d和imapd了,这里我们直接使用其默认设置:
# cp /usr/server/courier-imap/etc/pop3d.dist /usr/server/courier-imap/etc/pop3d
# cp /usr/server/courier-imap/etc/pop3d-ssl.dist /usr/server/courier-imap/etc/pop3d-ssl
# cp /usr/server/courier-imap/etc/imapd.dist /usr/server/courier-imap/etc/imapd
# cp /usr/server/courier-imap/etc/imapd-ssl.dist /usr/server/courier-imap/etc/imapd-ssl


三、启动服务

1)、MySQL
# /usr/server/mysql/share/mysql/mysql.server start
为了确保postfix以及以后的进程能够正确的搜索到libmysqlclient,在这里将mysql的lib设置到ldconfig的搜索路径中:
# ldconfig -m /usr/server/mysql/lib/mysql

2)、Postfix
# /usr/sbin/postfix start

3)、Courier-imap
# /usr/server/courier-imap/libexec/authlib/authdaemond start
# /usr/server/courier-imap/libexec/pop3d.rc start
# /usr/server/courier-imap/libexec/imapd.rc start

如果你想系统在启动的时候自动运行以上这些服务,可以直接将上面的这些启动服务的命令加入到/etc/rc.local中(这里是以BSD UNIX为例子,如果是非BSD UNIX系统请自行将/etc/rc.local更改为相应系统自启动文件名)。


四、测试系统

在进行下一步前,我们可以先对后台系统进行一下测试,以确保后台系统已经正常工作。
首先建立一个测试用户:
$ /usr/server/mysql/bin/mysql -upostfix -p
mysql> use postfix;
mysql> insert into domain(domain,active) values('cnfug.org','1');
mysql> insert into mailbox(username,password,name,maildir,domain,active) values('test@cnfug.org','test','TESTER','cnfug.org/test/Maildir/','cnfug.org','1');
mysql> quit;

测试postfix:
$ echo "hello world" | mail test@cnfug.org

$ ls -al /var/mailbox
drwx------ 3 www www 512 Oct 16 23:15 cnfug.org
$ ls -al /var/mailbox/cnfug.org
drwx------ 3 www www 512 Oct 16 23:15 .
drwxr-xr-x 7 www www 512 Oct 16 23:24 ..
drwx------ 3 www www 512 Oct 16 23:15 test
$ ls -al /var/mailbox/cnfug.org/test
drwx------ 3 www www 512 Oct 16 23:15 .
drwx------ 3 www www 512 Oct 16 23:15 ..
drwx------ 5 www www 512 Oct 16 23:15 Maildir
$ ls -al /var/mailbox/cnfug.org/test/Maildir
drwx------ 5 www www 512 Oct 16 23:15 .
drwx------ 3 www www 512 Oct 16 23:15 ..
drwx------ 2 www www 512 Oct 16 23:15 cur
drwx------ 2 www www 512 Oct 16 23:18 new
drwx------ 2 www www 512 Oct 16 23:18 tmp
上面ls反回的结果可以看到,一个名为cnfug.org的目录已经被postfix建立,同时可以看到目录结构为/var/mailbox/DOMAIN.LTD/USERNAME/Maildir/,这与我们设置的完全相同。

测试SMTP认证:
$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.cnfug.org ESMTP Postfix
EHLO cnfug.org
250-mail.cnfug.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
AUTH LOGIN
334 VXNlcm5hbWU6
dGVzdEBjbmZ1Zy5vcmc=
334 UGFzc3dvcmQ6
dGVzdA==
235 Authentication successful
测试中使用的用户名是test@cnfug.org密码是test,我们的测试成功了。

测试pop3
$ telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
USER test@cnfug.org
+OK Password required.
PASS test
+OK logged in.
上面的提示表示我们的pop3登录也成功了 :)。


五、安装配置Postfixadmin-2.0.5和iGENUS_2.0.2

现在所有的后台服务已经正常工作了,现在我们就开始安装管理界面和用户界面。

1)、安装postfixadmin-2.0.5
postfixadmin可以在http://high5.net/postfixadmin处得到,下载后是一个名为postfixadmin-2.0.5.tgz的文件
$ tar -zxvf postfixadmin-2.0.5.tgz
$ mv postfixadmin-2.0.5 postfixadmin
$ cd postfixadmin
为了让postfixadmin正常工作,需要进行一些小的设置,将postfixadmin目录中的config.inc.php.sample复制为config.inc.php,然后编辑其中的参数:
$ cp config.inc.php.sample config.inc.php
$ vi config.inc.php
本例中的配置如下:
// Language config
// Language files are located in './languages'.
$CONF['default_language'] = 'cn'; 

// Database Config
// 'database_type' is for future reference.
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'postfixadmin';
$CONF['database_name'] = 'postfix';

$CONF['encrypt'] = 'cleartext';

// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF['domain_path'] = 'YES';
// If you don't want to have the domain in your mailbox set this to 'NO'.
// Example: /usr/local/virtual/domain.tld/username
$CONF['domain_in_mailbox'] = 'NO';

// Quota
// When you want to enforce quota for your mailbox users set this to 'YES'.
$CONF['quota'] = 'YES';
$CONF['quota_multiplier'] = '1048576';

为了兼容性,所以我们在这里使用明文口令方式($CONF['encrypt']='cleartext';),邮箱的存储格式使用domain.ltd/username的形式,所以设置:
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';

按照上面的设置,在postfixadmin建立新的虚拟用户的时候,其maildir的格式为domain.ltd/username,但iGENUS是在domain.ltd/username/Maildir中进行操作,所以我们需要对postfixadmin做一点小的修改以使其与iGENUS兼容。
首先修改postfixadmin目录中的create-mailbox.php,找到该文件中的:
if ($CONF['domain_path'] == "YES")
{
if ($CONF['domain_in_mailbox'] == "YES")
{
$maildir = $fDomain . "/" . $fUsername . "/";
}
else
{
$maildir = $fDomain . "/" . $_POST['fUsername'] . "/";
}
}
else
{
$maildir = $fUsername . "/";
}
在其后面增加:
// Compat for iGENUS
$maildir .= "Maildir/";
同时修改postfixadmin/admin目录中的create-mailbox.php,找到该文件中的:
if ($CONF['domain_path'] == "YES")
{
if ($CONF['domain_in_mailbox'] == "YES")
{
$maildir = $fDomain . "/" . $fUsername . "/";
}
else
{
$maildir = $fDomain . "/" . $_POST['fUsername'] . "/";
}
}
else
{
$maildir = $fUsername . "/";
}
在其后面增加:
// Compat for iGENUS
$maildir .= "Maildir/";
到这里我们的postfixadmin就修改基本完成,另外,在这里我们使用了postfixadmin的中文语言包($CONF['default_language'] = 'cn';),由于这个语言包是在postfixadmin2.0.4的基础上制作的,所以在2.0.5中使用需要做一个小的修改,以使其能够正确的显示中文编码:
$ vi languages/cn.lang
找到该文件最前面的如下行:
$PALANG['YES'] = '是';
在该行前面加入:
$PALANG['charset'] = 'gb2312';
保存退出,到此,postfixadmin的修改就已经全部完成,现在可以将postfixadmin这个目录复制或上传到你的web目录中了,然后打开浏览器,进入postfixadmin的管理界面http://www.yourdomain.com/postfixadmin/admin/index.php,这里就可以新建域名和管理员了(注意,通过应该先建域名,再建立管理员)。然后用新建立的管理员登录到http://www.yourdomain.com/postfixadmin/index.php中就可以建立该域的邮箱了。


2)、安装iGENUS_2.0.2

从www.igenus.org处得到igenus_2.0.2_20040901_release.tgz,将其解开:
$ tar -zxvf igenus_2.0.2_20040901_release.tgz
$ cd igenus
由于igenus使用了自己的表结构,所以要在postfix的基础上使用igenus的所有功能,还需要进行比较大的修改,这里我们就不再讨论,本文中我们就向大家介绍如何使用户能够登录到igenus中,并且正常的发邮件和收邮件,其它功能就不再介绍。
首先需要修改igenus的配置文件,让其它知道如何与MySQL连接:
$ cd config
$ vi config_inc.php
根据你的实际情况修改以下内容(配置中的中文为笔者说明):
$CFG_BASEPATH = "/htdocs/mail/igenus";   //iGENUS的绝对路径

// Mysql
$CFG_MYSQL_HOST = 'localhost';
$CFG_MYSQL_USER = 'postfixadmin';      //因为用户需要在igenus中更改密码等,所以需要使用对数据库具有写权限的postfixadmin用户,而非拥有只读权限的postfix用户
$CFG_MYSQL_PASS = 'postfix';
$CFG_MYSQL_DB = 'postfix';

// Temp directory for maildir listing,mail body decodeing etc.
$CFG_TEMP = $CFG_BASEPATH."/temp";     //这里我们将igenus的临时目录设置为igenus安装目录下的temp目录

现在需要建立temp文件夹,并使其可被web服务器的用户读写: 
$ mkdir igenus/temp
$ chmod 777 igenus/temp

同时要使igenus使用Postfixadmin的表结构,我们需要修改igenus目录中的login.php文件,以使用户能够正常登录。
$ vi login.php
修改其中的:
$query = "SELECT * FROM vpopmail WHERE pw_name='$Post_name' and pw_domain='$Post_domain'";
为:
$query = "SELECT * FROM mailbox WHERE username='$Post_name@$Post_domain' and active='1'";
将:
$home = $data['pw_dir'];
$Post_passwd2 = $data['pw_passwd'];
$pw_id = $data['pw_id'];
$pw_shell = $data['pw_shell'];
$pw_gecos = $data['pw_gecos'];
$pw_gid = $data['pw_gid'];
$pw_domain = strtolower($data['pw_domain']);
$pw_name = strtolower($data['pw_name']);
修改为:
$home = "/var/mail/" . $data['maildir'] . "../";
$Post_passwd2 = $data['password'];
$pw_shell = $data['quota'];
$pw_gecos = $data['name'];
$pw_domain = strtolower($data['domain']);
$pw_name = strtolower($data['username']);
其中$home = "/var/mail/" . $data['maildir'] . "../";是告诉iGENUS邮件存储的路径,"/var/mail/"为我们的邮件存放目录,同时因为iGENUS进行读写邮件时会在$home变量后面加上字符串"Maildir/",但我们的MySQL数据表mailbox中的maildir字段中已经包含"Maildir/",所以为了让iGENUS得到正确的路径,我们在最后加上了字符串"../"

修改:
if ($pw_gid & 0x04){
PutLogs($pw_id, 'login', "no priv to login","$Post_name@$Post_domain", $sql);
ErrorExit(-2); // 用户无权登录
}

if ($home !="" && ($Post_passwd2 == crypt($Post_passwd,$Post_passwd2))){
为:
if ($pw_gid & 0x04){
PutLogs($pw_id, 'login', "no priv to login","$Post_name@$Post_domain", $sql);
ErrorExit(-2); // 用户无权登录
}

if ($home !="" && ($Post_passwd2 == $Post_passwd)){


注释或者删除:
$_SESSION['G_ID'] = $pw_id;


保存修改,现在你就可以登录到igenus中了。


到这里,我们的Postfix Powered的邮件系统已经完成 :)


网友: szxsztszk 时间:2007-07-05 18:43:08 IP地址:219.137.205.★
mysql-4.0.21.tar.gz
cyrus-sasl-2.1.19.tar.gz
postfix-2.1.4.tar.gz
courier-imap-3.0.7.tar.bz2
postfixadmin-2.0.5.tgz
igenus_2.0.2_20040901_release.tgz

网友: 本站网友 时间:2007-07-08 11:33:03 IP地址:218.19.222.★
Postfix 中对邮件队列的操作命令

postfix的队列是放在/var/spool/deferred下的,
queuemgr命令可以删除指定ID号的队列邮件.
postqueue -p 查看队列内容
postcat 查看队列里邮件内容
postsuper -d ALL hold/deffered... 删除某个队列里所有邮件

postqueue 还有个参数是强制发送的
好像是 -f 

mailq,查看具体的邮件的ID
然后postsuper -d queue_id 就可以从队列中删掉指定ID的邮件

网友: ajiangg 时间:2007-07-14 23:55:11 IP地址:58.83.208.★
有没有研究过用开启SELinux来配置,毕竟SElinux也是为了保证安全,不开启太浪费了。。。但一开启又带来配置上的很多麻烦。。。

网友: 本站网友 时间:2007-12-23 22:26:44 IP地址:221.218.137.★
请问在这步
15.2.配置:
vi /etc/mail/spamassassin/init.pre
激活下面两个插件(去掉前面的 # ):
为什么没有找到loadplugin Mail::SpamAssassin::Plugin::DCC  ???的
这个选项啊?

网友: szxsztszk 时间:2007-12-23 23:35:58 IP地址:61.170.143.★
注意:
1。“loadplugin Mail::SpamAssassin::Plugin::DCC  ???”实际是没有后面的3个问号的。有疑问的地方做电子笔记时加问号,纯属个人习惯问题。
2。如果没有“loadplugin Mail::SpamAssassin::Plugin::DCC”,请自行添加后测试。

时间久了,没测试环境,暂无法测试。谅解。

 发表评论