sendmail

Mail Server
MUA
Mail User Agent 比如Outlook Express 帮助用户接收、浏览及编写邮件
MTA
Mail Transfer Agent
一般提到的Mail Server就是MTA
主要功能是接受信件,转发信件,响应用户的收信要求
MDA
Mail delivery agent
分析由MTA所收到的信件表头或内容等数据,从而决定邮件的去向。
Install
[root@centos1 ~]# rpm -qa | grep m4
m4-1.4.5-3.el5.1
[root@centos1 ~]# rpm -qa | grep sendmail
sendmail-doc-8.13.8-2.el5
sendmail-devel-8.13.8-2.el5
sendmail-8.13.8-2.el5
sendmail-cf-8.13.8-2.el5
[root@centos1 ~]#
vim /etc/mail/sendmail.mc 修改 116 行smtp侦听范围127.0.0.1为0.0.0.0
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
修改155行 LOCAL_DOMAIN(`localhost.localdomain')dnl为 LOCAL_DOMAIN(`nono.com')dnl
使用m4命令生成sendmail.cf,sendmail.mc是模板文件
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
修改local-host-names文件添加域名及主机名
vim /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
nono.com.
mail.nono.com.
~         
添加MX记录到dns    
重启sendmail并检查端口启动情况
[root@centos1 ~]# /etc/init.d/dovecot start
Starting Dovecot Imap:
[root@centos1 ~]# /etc/init.d/sendmail start
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
[root@centos1 ~]# netstat -tlupn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name  
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN      3536/hpiod         
tcp        0      0 0.0.0.0:902                 0.0.0.0:*                   LISTEN      3264/rpc.statd     
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      11925/mysqld       
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      3227/portmap       
tcp        0      0 192.168.1.51:53             0.0.0.0:*                   LISTEN      28543/named        
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      28543/named        
tcp        0      0 0.0.0.0:23                  0.0.0.0:*                   LISTEN      3609/xinetd        
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2854/cupsd         
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      29237/sendmail: acc
主要检查是否开启smtp的25端口,pop3的110端口及imap的143端口
 

你可能感兴趣的:(职场,sendmail,休闲)