Postfix邮件服务器原来图
实验环境
一台redhatenterprise 6.0 服务器
安装postfix和dovecot
安装webmail
一台window8.1 3客户端
安装office 2013
服务器配置
停止sendmail
Pstree | grep sendmail
Service sendmail stop
Chkconfig sendmail off
Chkconfig --list sendmail
Pstree | grep sendmail
安装postfix和dovecot
Rpm –qa | grep postfix
Yum –y install postfix* (25号端口发邮件)
Yum –y install dovecot* (110号端口收邮件)
配置postfix
Vi /etc/postfix/main.cf
Myhostname =mail.davy.org
Mydomain = davy.org
Myorigin = $myhostname
Myorigin = $mydomain
Inet_interfaces =all
Mydestination =$myhostname $mydomain
Mynetwork =192.168.100.0/24,127.0.0.0/8
Relay_domains= $mydestination
启动postfix
Service postfix restart
Netstat –tunpl | grep 25
Pstree | grep master
Chkconfig –level 35 postfixon
Chkconfig –list | greppostfix
Alternatives –config mat (选择默认邮件服务器)
配置dovecot
Vi /etc/dovecot.conf
Protocols =imap imaps pop3 pop3s
启动dovecot
Service postfix restart
Netstat –tunpl | grep 110
Pstree | grep dovecot
Chkconfig –level 35 dovecoton
Chkconfig –list | grepdovecot
测试
创建系统账号(即邮件用户)
Useradd user1
Passwd user1
Useradd user2
Passwd user2
客户端配置邮箱
Linux里收发邮件
telnet 192.168.100.1 25 (发邮件)
mail from:root@davy.org (发件人)
rcpt to:user1@davy.org(收件人)
data(内容)
root ->user1(内容部分)
.(结束)
Quit(退出)
Mail (收邮件)
2 (选择)
d (删除)
shell脚本
#! /bin/bash
#disk.sh
echo “the contents of thismail” | mail user1@davy.org –s “the object”