开源postfix邮件部署服务

来源:互联网 发布:景观设计效果图软件 编辑:程序博客网 时间:2024/06/10 05:23
 

6.1所需要的安装包

Yum –y installpostfix*

Yum –y installdovecot*

Yum –y installcyrus-imapd*

Yum –y installsaslauthd*

Yum –y install squirrelmail*

 

6.2、配置mail服务器

service sendmailstop

chkconfig sendmailoff

安装postfix

yum installpostfix -y

配置postfix配置文件

vim/etc/postfix/main.cf

修改以下配置文件

myhostname =mail.tmd.com

mydomain = tmd.com

myorigin =$mydomain

inet_interfaces =all

mydestination =$myhostname, $mydomain

mailbox_transport= lmtp:unix:/var/lib/imap/socket/lmtp

mynetworks =192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24, 192.168.4.0/24, 192.168.5.0/24,192.168.10.0/24, 192.168.100.0/24, 202.10.10.0/30 www.163.com, www.126.com, qq.com

service postfix restart

 

6.3、安装收件服务

yum installdovecot -y

protocols = pop3pop3s

protocol pop3 {

     listen = *:10100

     ..

}

 

启动服务

/etc/init.d/dovecot start

 

6.4、修改验证方式

必须修改验证方式为shadow

yum installcurus-sasl-*

修改配置文件vim /etc/sysconfig/saslauthd

MECH = shadow

/etc/inin.d/saslauthdrestart

chkconfig saslauthd on

 

6.5建立mailbox

useradd test

passwd test               密码为test

yum installcurus-imapd cyrus-imapd-devel -y

给自动生成的cyrus用户设置密码

passwd cyrus

cyradm -u cyruslocalhost连接本机

/etc/init.d/cyrus-imapdstart

       cyradm -u cyrus localhost cyrus用户登录本机mailbox

       输入正确密码后login

              >createmailbox user.test  建立一个test帐号

quit.

 

6.6、实现webmail管理

yum install httpd-y

yum installquirrelmail -y

配置文件

/usr/share/squirrelmail/config/conf.pl

d                   cyrus

2     1     tmd.com(设置域名)  3     2(类型)

4     5     y(区别大小写)

10   1     zh_CN    2     gb2312(语言编码)

s      保存退出

service httpd restart

 

6.7、设置支持开机启动

chkconfig postfixon

chkconfig dovecoton

chkconfigcyrus-imapd on

chkconfig httpd on

chkconfig saslauthd on

0 0
原创粉丝点击