sendmail (邮件服务器)

sendmail (邮件服务器)

MUA (Mail User Agent) 邮件用户代理

MTA (Mail Transfer Agent) 邮件传输代理
MDA (Mail Dilivery Agent) 邮件接收发送代理

SMTP (Simple Message Transfer Potocol) 25号端口

POP3 ( Post Office Protocol)  110号端口

安装:

挂载第二张光盘
rpm -ivh sendmail-8.13.1-2.i386.rpm
rpm -ivh m4-1.4-16.i386.rpm

挂载第四张光盘

rpm -ivh sendmail-cf-8.13.1-2.i386.rpm
rpm -ivh sendmail-doc-8.13.1-2.i386.rpm
rpm -ivh sendmail-devel-8.13.1-2.i386.rpm

vi /etc/mail/local-host-names

增加本地域和主机的FQDN

service sendmail restart

说明:
Sendmail.mc是sendmail的主配置文件,它决定了sendmail的属性。Sendmail.mc是由若干个宏代码构成,可以通过m4工具编译成sendmail.cf

vi /etc/mail/sendmail.mc

修改:DAEMON_OPTIONS ('port=smtp,Addr=127.0.0.1,Name=MTA')dnl
为:  DAEMON_OPTIONS ('port=smtp,Addr=0.0.0.0,Name=MTA')dnl

转换文件:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

安装邮局服务:
挂载第四张光盘
rpm -ivh dovecot-0.99.11-2.EL4.i386.rpm
vi /etc/dovecot.conf
#protocols = imap imaps
改为:
protocols = imap imaps pop3 pop3s

service dovecot restart

netstat -tnlp | grep 110

PS:
DNS中要写入
       IN   MX       10 baidu.com.
mail   IN   A        192.168.8.8
smtp   IN   CNAME    mail
pop3   IN   CNAME    mail

发送邮件:
mail  user1
subject:hello
welcome to here

ctrl+DD  发送邮件