码迷,mamicode.com
首页 > 系统相关 > 详细

《Linux菜鸟入门2》mail服务

时间:2016-12-02 08:09:24      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:master   linux   file   

配置DNS

mailwestos.example.com

vim /etc/named.rfc1912.zones

  zone "westos.com" IN {

         type master;

         file "westos.com.zone";

        allow-update { none; };

  };

  zone "linux.com" IN {

          type master;

         file "linux.com.zone";

         allow-update { none; };

  };


cp -p named.localhost westos.com.zone

vim /var/named/westos.com.zone 


技术分享


cp -p westos.com.zone linux.com.zone

vim /var/named/linux.com.zone 

技术分享

systemctl restart named

systemctl stop firewalld


vim /etc/postfix/main.cf 

技术分享

技术分享

技术分享

技术分享

maillinux.example.com

    

技术分享

技术分享

技术分享

技术分享

●别名发送:


linux.com 主机向 westos.com主机发送邮件,使用别名发送

vim /etc/aliases

技术分享


    vim /etc/moreusers 

        root

        student



 postalias /etc/aliases

 systemctl restart postfix.service 



4.出站地址伪装

server (westos.com)主机:

vim /etc/postfix/generic 

技术分享

postmap /etc/postfix/generic

postconf -d | grep generic 会出来一段字符,选择最后的一行字符(如下),进行复制:

smtp_generic_maps =

postconf -e "smtp_generic_maps = hash:/etc/postfix/generic" ##此处用到上条语句复制的字符

systemctl restart postfix.servic





5.检测25端口

下载 yum install telnet -y

技术分享

技术分享

250 2.0.0 Ok: queued as 38E0C17E849

quit ##退出telnet

221 2.0.0 Bye

Connection closed by foreign host.


本文出自 “12147236” 博客,转载请与作者联系!

《Linux菜鸟入门2》mail服务

标签:master   linux   file   

原文地址:http://12157236.blog.51cto.com/12147236/1878741

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!