postfix和dovecot简单的邮件服务器
2015-06-08 20:05
489 查看
[align=center]postfix和dovecot简单的邮件服务器
[/align]
一、安装postfix和dovecot
yum install postfix
yum install dovecot
二、postfix邮件服务器的配置
vim /etc/postfix/main.cf
myhostname = mail.ning.com
mydomain = ning.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $mydomain
mynetworks = 0.0.0.0/0
relay_domains = $mydestination
home_mailbox = Maildir/
service postfix restart
把 inet_interfaces = localhost 注释掉
三、用telnet测试邮件服务器是否正常
1. 在邮件服务器上安装telnet
yum install telnet
2. 连接服务器SMTP端口
telnet 192.168.1.22 25
3. 填写发件人
MAIL FROM:<test@cning.com>
回车
4. 填写收件人
RCPT TO:contact@ning.com
回车
5. 撰写邮件内容
5.1 开始写邮件内容
DATA
回车
5.2 输入标题
Subject: test message
回车
5.3 输入内容,并以.号结束
test body .
如果显示下面的信息,说明邮件进入发送队列
250 2.0.0 Ok: queued as 88D6D32A94
四、配置dovecot 收取邮件
vim /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
listen = *, ::
login_trusted_networks =0.0.0.0/0
vim /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir #只定邮箱路径
vim /etc/dovecot/conf.d/10-auth.conf
auth_mechanisms = plain login #允许验证和登录
disable_plaintext_auth = yes #允许明文登录
vim /etc/dovecot/conf.d/10-master.conf
unix_listener auth-userdb { #允许运行的数据库
#mode = 0600
user =postfix
group =postfix
}
service dovecot restart
五、测试
新建用户 useradd aaa -p 521521
mail aaa@ning.com
接受端可用foxmail测试
[/align]
一、安装postfix和dovecot
yum install postfix
yum install dovecot
二、postfix邮件服务器的配置
vim /etc/postfix/main.cf
myhostname = mail.ning.com
mydomain = ning.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $mydomain
mynetworks = 0.0.0.0/0
relay_domains = $mydestination
home_mailbox = Maildir/
service postfix restart
把 inet_interfaces = localhost 注释掉
三、用telnet测试邮件服务器是否正常
1. 在邮件服务器上安装telnet
yum install telnet
2. 连接服务器SMTP端口
telnet 192.168.1.22 25
3. 填写发件人
MAIL FROM:<test@cning.com>
回车
4. 填写收件人
RCPT TO:contact@ning.com
回车
5. 撰写邮件内容
5.1 开始写邮件内容
DATA
回车
5.2 输入标题
Subject: test message
回车
5.3 输入内容,并以.号结束
test body .
如果显示下面的信息,说明邮件进入发送队列
250 2.0.0 Ok: queued as 88D6D32A94
四、配置dovecot 收取邮件
vim /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
listen = *, ::
login_trusted_networks =0.0.0.0/0
vim /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir #只定邮箱路径
vim /etc/dovecot/conf.d/10-auth.conf
auth_mechanisms = plain login #允许验证和登录
disable_plaintext_auth = yes #允许明文登录
vim /etc/dovecot/conf.d/10-master.conf
unix_listener auth-userdb { #允许运行的数据库
#mode = 0600
user =postfix
group =postfix
}
service dovecot restart
五、测试
新建用户 useradd aaa -p 521521
mail aaa@ning.com
接受端可用foxmail测试
相关文章推荐
- 小心服务器内存居高不下的元凶--WebAPI服务
- 垃圾邮件过滤器 python简单实现
- 运维入门
- Centos6 编译安装Python
- 硬盘安装CentOS 6.2以及添加GRUB启动菜单
- CentOS 6.2实战部署Nginx+MySQL+PHP
- CentOS 7系统配置上的变化解析
- Linux5.9无人值守安装
- 数据中心和云未来的十二大趋势
- 用vsftp快速搭建ftp服务器
- Linux快速构建apache web服务器
- 服务器监控策略浅谈
- 如何降低服务器采购成本 原理分析
- 建议的服务器分区办法
- 服务器托管六大优势分析
- Erlang实现的一个Web服务器代码实例
- CentOS下DB2数据库安装过程详解