postfix基础篇

简介:

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

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

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

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

一:修改主机名:

[root@mail ~]# vim /etc/sysconfig/network

image 

[root@mail ~]# vim /etc/hosts

image

二:搭建本地yum:

[root@mail ~]# vim /etc/yum.repos.d/rhel-debuginfo.repo

image

三:搭建dns服务器:

[root@mail ~]# mkdir /mnt/cdrom

[root@mail ~]# mount /dev/cdrom /mnt/cdrom/

[root@mail ~]# cd /mnt/cdrom/Server/

[root@mail Server]# yum install bind  -y       #安装dns主程序

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

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

[root@mail Server]# cd /var/named/chroot/etc/

[root@mail etc]# cp -p named.caching-nameserver.conf named.conf

[root@mail etc]# vim named.conf         #编辑主配置文件

image 

image

image

[root@mail etc]# vim named.rfc1912.zones        #编辑区域声明文件

image

[root@mail etc]# cd ../var/named/

[root@mail named]# cp -p localhost.zone sina.com.db     

[root@mail named]# vim sina.com.db        #编辑数据库文件

image

[root@mail named]# vim /etc/resolv.conf       #编辑本地dns指向

image

[root@mail named]# service named start

[root@mail named]# chkconfig named on       #开机自动启动

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

[root@mail named]# cd /mnt/cdrom/Server/

[root@mail Server]# yum install postfix –y        #使用yum安装postfix

image

image

image

image

image

image

[root@mail Server]# service postfix start        #开启postfix

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

[root@mail Server]# yum install dovecot –y       #安装dovecot主软件包

[root@mail Server]# rpm -ql dovecot |less      #查看dovecot安装的位置

image 

[root@mail Server]# vim /etc/dovecot.conf       #编辑dovecot的主配置文件

image

[root@mail Server]# service dovecot start       #启动dovecot

[root@mail Server]# chkconfig dovecot on       #设置为开机自动启动

六:创建用户:

[root@mail Server]# useradd user1

[root@mail Server]# passwd user1

[root@mail Server]# useradd user2

[root@mail Server]# passwd user2

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

user1向user2发送邮件:

[root@mail Server]# telnet 127.0.0.1 25      #登录本地邮件服务器

image

[root@mail Server]# su – user2        #切换到user2用户

[user2@mail ~]$ mail     #查看邮件

image

user2向user1发送邮件:

[root@mail Server]# telnet 127.0.0.1 25

image

[root@mail Server]# su – user1      #切换到用户user1

[user1@mail ~]$ mail    #查看邮件

image

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

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

image

image

image

image

image

image

image

image

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

user1向user2发送邮件:

image

image

image

user2向user1发送邮件:

image

image

image










本文转自 liuyatao666 51CTO博客,原文链接:http://blog.51cto.com/5503845/1018277,如需转载请自行联系原作者
目录
相关文章
|
Unix 开发工具
|
Unix 开发工具
|
网络协议 Unix 开发工具
|
测试技术 开发工具 数据安全/隐私保护
|
Oracle 网络协议 关系型数据库
|
关系型数据库 MySQL 数据库
|
网络协议 关系型数据库 测试技术