SENDMAIL

  [加密  认证  电子邮件服务器!]

一种强大的邮件传输代理程序,一般电子邮件的流程:用户代理  传输和投递代理

 

 

 

 

实验步骤:

 

使用rpm或使用yum平台安装sendmail-8.13.8-2.el5及一些相关的相关程序和工具!(程序----sendmail-cf、工具---sendmail-docm4)

rpm  -ivh  sendmail-8.13.8-2.el5

rpm  -ivh  sendmail-cf-8.13.8-2.el5

rpm  -ivh  sendmail-doc-8.13.8-2.el5

rpm  -ivh  m4-1.4.5-3.el5.1

 

 

-----安装之后主要的文件都在  /etc/mail目录下;

[1]、其中sendmail的主配置文件是:  sendmail.mc然后修改配置文档如下:

 

 

[2]、还有sendmail的数据库文件access

[3]、修改本地计算机的别名;

   /etc/mail/目录下中的  local-host-names文件中;

[4]、重启sendmail服务;

[5]、创建几个用户;

 

[6]DNS服务器的配置

-----------(1)bind-chroot-9.3.6-4.P1.el5

-----------(2)bind-9.3.6-4.P1.el5

-----------(3)caching-nameserver-9.3.6-4.P1.el5

 

在目录 /var/named/chroot/etc/  下:

cp   -p  named-localhostnamed-conf  named.conf

 

[配置文件:/var/named/chroot/etc/named.conf]

 

修改区域声明文件:[named.rfc1912.zones]

生成数据库

 

修改主机名:

vim  /etc/sysconfig/network

 

修改hosts文件:

vim  /etc/hosts

[7]、重启系统在进行下面的操作!

 

    sendmail验证服务之前安装-------dovecot

 

[8]、配置证书服务!

[root@mail CA]# mkdir crl certs newcerts

[root@mail CA]# touch serical index.txt

[root@mail CA]# echo "01" >serical

 

[root@mail CA]#  openssl req -x509 -new -key private/cakey.pem -out cacert.pem -days 3650

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [GB]:CN

State or Province Name (full name) [Berkshire]:henan

Locality Name (eg, city) [Newbury]:zhengzhou

Organization Name (eg, company) [My Company Ltd]:zzu

Organizational Unit Name (eg, section) []:tec

Common Name (eg, your name or your server's hostname) []:hanyu

 

[root@mail mail]# mkdir /etc/mail/certs

[root@mail mail]# cd /etc/mail/certs/

[root@mail certs]# openssl genrsa 1024 >sendmail.key

[root@mail certs]# openssl req -new -key sendmail.key -out sendmail.csr

[root@mail certs]# openssl ca -in sendmail.csr -out sendmail.cert

[root@mail certs]# cp /etc/pki/CA/cacert.pem  .

[root@mail mail]# vim /etc/mail/sendmail.mc