postfix基础篇

postfix是Wietse Venema在IBM的GPL协议之下开发的MTA(邮件传输代理)软件。postfix是Wietse Venema想要为使用最广泛的sendmail提供替代品的

个尝试。在Internet世界中,大部分的电子邮件都是通过sendmail来投递的,大约有100万用户使用sendmail,每天投递上亿封邮件。这真是一个让人吃惊

数字。Postfix试图更快、更容易管理、更安全,同时还与sendmail保持足够的兼容性。

上篇笔者只做的postfix配置的简单介绍,下篇中笔者将使用web方式实现对postfix邮件接收发送的管理

一:修改主机名:

[[email protected] ~]# vim /etc/sysconfig/network

postfix基础篇 

[[email protected] ~]# vim /etc/hosts

postfix基础篇

二:搭建本地yum:

[[email protected] ~]# vim /etc/yum.repos.d/rhel-debuginfo.repo

postfix基础篇

三:搭建dns服务器:

[[email protected] ~]# mkdir /mnt/cdrom

[[email protected] ~]# mount /dev/cdrom /mnt/cdrom/

[[email protected] ~]# cd /mnt/cdrom/Server/

[[email protected] Server]# yum install bind  -y       #安装dns主程序

[[email protected] Server]# yum install bind-chroot –y      #安装与安全有关的软件包

[[email protected] Server]# yum install caching-nameserver –y      #安装与缓存有关的软件包

[[email protected] Server]# cd /var/named/chroot/etc/

[[email protected] etc]# cp -p named.caching-nameserver.conf named.conf

[[email protected] etc]# vim named.conf         #编辑主配置文件

postfix基础篇 

postfix基础篇

postfix基础篇

[[email protected] etc]# vim named.rfc1912.zones        #编辑区域声明文件

postfix基础篇

[[email protected] etc]# cd ../var/named/

[[email protected] named]# cp -p localhost.zone sina.com.db     

[[email protected] named]# vim sina.com.db        #编辑数据库文件

postfix基础篇

[[email protected] named]# vim /etc/resolv.conf       #编辑本地dns指向

postfix基础篇

[[email protected] named]# service named start

[[email protected] named]# chkconfig named on       #开机自动启动

四:搭建postfix邮件发送服务器

[[email protected] named]# cd /mnt/cdrom/Server/

[[email protected] Server]# yum install postfix –y        #使用yum安装postfix

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

[[email protected] Server]# service postfix start        #开启postfix

五:搭建dovecot邮件接收服务器:

[[email protected] Server]# yum install dovecot –y       #安装dovecot主软件包

[[email protected] Server]# rpm -ql dovecot |less      #查看dovecot安装的位置

postfix基础篇 

[[email protected] Server]# vim /etc/dovecot.conf       #编辑dovecot的主配置文件

postfix基础篇

[[email protected] Server]# service dovecot start       #启动dovecot

[[email protected] Server]# chkconfig dovecot on       #设置为开机自动启动

六:创建用户:

[[email protected] Server]# useradd user1

[[email protected] Server]# passwd user1

[[email protected] Server]# useradd user2

[[email protected] Server]# passwd user2

测试:在本地服务器上进行测试:

user1向user2发送邮件:

[[email protected] Server]# telnet 127.0.0.1 25      #登录本地邮件服务器

postfix基础篇

[[email protected] Server]# su – user2        #切换到user2用户

[[email protected] ~]$ mail     #查看邮件

postfix基础篇

user2向user1发送邮件:

[[email protected] Server]# telnet 127.0.0.1 25

postfix基础篇

[[email protected] Server]# su – user1      #切换到用户user1

[[email protected] ~]$ mail    #查看邮件

postfix基础篇

测试:使用windows  server  2003自带的outlook  express工具进行测试:

点击:开始——》程序——》outlook express

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

postfix基础篇

依照以上方法创建user2即可,这里不再赘述!!!

user1向user2发送邮件:

postfix基础篇

postfix基础篇

postfix基础篇

user2向user1发送邮件:

postfix基础篇

postfix基础篇

postfix基础篇










本文转自 liuyatao666 51CTO博客,原文链接:http://blog.51cto.com/5503845/1018277,如需转载请自行联系原作者