18----postfix saslauthd syrus-imapd squirrelmail

 

1.       配置dns
配置主文件 /var/named/chroot/etc/named.conf
Options {
Directory “/var/named”;};
zone “zhaojianwei.com”{
        type master;
        file “zhaojianwei.com.zone”;};
zone “0.168.192.in-addr.arpa”{
        type master;
        file “zhaojianwei.192.168.0;};
配置区文件  
zhaojianwei.com.zone    
添加:
@ IN    NS    mail.zhaojianwei.com
Mail IN A     192.168.0.2
@ IN MAX 10 mai.zhaojianwei.com
2.       安装 postfix
关闭sendmail 
检查 telnet localhost  25
Mail from:root@hostlocal
Rcpt to:root@localhost
Subject:hello
.
3.       修改配置文件 /etc/postfix/main.cf
Myhostname =mail.zhaojianwei.com
Mydomain = zhaojianwei.com
Myorigin =mydomain
Interfaces = all
Mynetwork= 192.168.0.0/24
Relay domains =zhaojianwei.com
4.       检查cyrus-saslauthd是否安装
Rpm –qa |grep cyrus-sasl
Useradd bbb
Passwd bbb
配置/etc/sysconfig /saslauthd
mech=shadow
启动saslauthd 服务
service saslauthd start
chkconfig saslauthd on
Testsaslauthd –u bbb –p ‘123 ###检查saslauthd功能是否好用
用户通过成功’
5.       Vim /etc/postfix/main.cf     ###设置smtp认证在邮件的应用
mtpd_sasl_auth_ehable=yes
smtpd_sasl_local_domain = '' 默认定义的域名
smtpd_recipient_restrictions =permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
broken_sasl_auth_clients=yes 是否是以客户端为主,在你那通过没有用
smtpd_client_restrictions=permit_sasl_authenticated
smtpd_sasl_security_options=noanonymous 禁止匿名
6.       telnet mail.vfast.com 验证
ehlo vfast.com
Perl -MMIME::Base64 –e ‘print encode_base54 (“aaa”);’
AUTH LOGIN
7.       安装dovecot cyrus-imapd 数据库
配置 /etc/dovecot.conf 
注释修改第20行为:# protocols = pop3 pop3s
35注释# protocol pop3 {
        Listen = *:10000
}
配置 /etc/postfix/main.cf
注释456 启用mail-box路径
Service dovecot start
Chkconfig dovecot on
Service postfix restart
Service cyrus-imapd start
Chkconfig cyrus-imapd on
8.       登录后台并创建用户
Cyadm –u aaa localhost
Cm user.aaa.Trush
Cm user.aaa.Send
Cm user.aaa.Drafts
Setquota user.aaa 5210
9.       Squirrelmail 网页版的php 邮箱
Yum install squirrelmail
/usr/share/squirrelmail/config/conf.pl
更改domain ,sendmail or smtp
   修改语言为 zh_CN
   Charset  gb2312
10.   安装好httpd后,以网页形式登陆
Mail.zhaojianwei.com/webmail
 
 
 
 

你可能感兴趣的:(postfix)