listen-on port 53 { any; };
allow-query { any; };
match-clients { any; };
match-destinations { any; };
|
zone "126.com" {
type master;
file "126.com";
};
zone "100.16.172.in-addr.arpa" {
type master;
file "172.16.100.fx";
};
|
mail IN A 172.16.100.150
126.com. IN MX 10 mail
|
147 IN PTR 126.com.
|
cd /var/named/chroot/var/named/
bind-chroot-admin -s
|
service named restart
chkconfig –level 35 named on
|
[root@mail ~]# rpm -qa|grep sendmail
sendmail-8.13.8-2.el5
sendmail-cf-8.13.8-2.el5
|
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
//
去掉上面两行前面的
dnl,
修改后为
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
|
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
//
修改该行中的
127.0.0.1
为
0.0.0.0
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
|
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
|
126.com
|
service sendmail restart
chkconfig –level 35 sendmail on
|
service saslauthd restart
|
#protocols = imap imaps pop3 pop3s
//
将该行修改为如下即可
protocols = imap pop3
|
service dovecot restart
|
[root@mail ~]# cd /var/www/html/mail/
[root@mail mail]#mkdir attach data
[root@mail mail]#chown –R daemon.daemon attach data
[root@mail mail]#chmod 730 attach
|
[root@mail ~]# ln -s /usr/share/squirrelmail/ /var/www/html/mail
[root@mail ~]# cd /var/www/html/mail/config/
[root@mail config]# vi config.php
$squirrelmail_default_language = 'zh_CN';
、
$default_charset = 'zh_CN.UTF-8';
$domain = '126.com';
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$imap_server_type = 'dovecot';
$imapPort = 143;
$data_dir = '/var/www/html/mail/data/';
$attachment_dir = '/var/www/html/mail/attach/';
|
service httpd restart
chkconfig --level 35 httpd on
|
adduser -s /sbin/nologin haha;passwd haha
adduser -s /sbin/nologin hehe;passwd hehe
|
本文出自 “刘文斌” 博客,谢绝转载!