看中小型企業如何配置Sendmail 執行個體介紹(1)

來源:互聯網
上載者:User

其實中小企業配置Sendmail 無非就是那麼幾步,其實很簡單,請看下文。

我們假定該企業採用專線接入Internet,有兩台Linux伺服器(Redhat 6.1 )

一台作為防火牆直接接入Chinanet,是通向Internet的唯一出入口,同時也作為DNS/SMTP 伺服器,且申請了網域名稱domain.com,由該防火牆伺服器(DNS伺服器)對域domain.com進行解析。另一台郵件伺服器是在內部網段運行,完全與外部世界無關。作為內部區域網路上使用者的收/發郵件伺服器。

地址:假定防火牆Linux伺服器的永久外部地址為a.b.c.d(eth0),內部網卡地址

192.168.11.5(eth1),機器名為firewall.domain.com, 內部的郵件伺服器地址為192.168.11.1,機器名為mail.domain.com , 且註冊域時填寫的主機名稱為dns.domain.com(a.b.c.d) .

思路:先配置DNS伺服器,用來解析@domain.com的網域名稱,並指明MX記錄到內部郵件主機mail.domain.com. 把這台防火牆僅作為mail relay主機,任何從外部

世界發往@domain.com域的郵件均由它處理且relay到內部郵件主機,僅接受@domain.com尾碼的郵件進入,這樣阻止了spammer發送垃圾郵件。

在內部郵件伺服器上,配置Sendmail的DS部分為firewall.domain.com,任何發往非內部員工的郵件直接送往firewall.domain.com,且設定domain.com為

本地區,任何發往@domain.com域的郵件被內部別名處理並送往內部各使用者的郵件緩衝池中。

旅行使用者的考慮:

若公司員工出差在外需從公司的伺服器內送郵件,一種方法是直接撥當地ISP,然後設定內送郵件伺服器為mail.domain.com,但要求mail.domain.com在外地被解析成防火牆的外部永久地址,這樣再在防火牆上設定plug-gw代理,代理任何到防火牆外部地址的110連接埠的請求到內部192.168.11.1的110連接埠。另一種方法,也可以再建一伺服器為Linux撥入伺服器,直接撥到公司來內送郵件。

重點:Sendmail的各項配置及相關設定

一:防火牆上的Sendmail配置

我們採用Redhat Linux 6.1 加 Sendmail 8.9.3作為作業環境:

安裝作業系統和防火牆的配置略,建議採用3c905b或者Intel pro100 的網卡,先配置DNS。

設定/etc/named.conf象這樣:

============

zone "."{

type hint;

file "named.ca";

};

zone "0.0.127.in-addr.arpa"{

notify no;

type master;

file "127.0.0";

};

zone "11.168.192.in-addr.arpa"{

notify no;

type master;

file "192.168.11";

};

zone "domain.com" {

notify no;

type master;

file "domain.com";

};

檔案 192.168.11象下面這樣:

@ IN SOA dns.domain.com. root.mail.domain.com. (

1999092201 86400 3600 3600000 86400 )

NS dns.domain.com.

1 PTR mail.domain.com.

5 PTR firewall.domain.com.

檔案 domain.com象下面這樣:

@ IN SOA dns.domain.com. root.mail.domain.com. (

1999120401 86400 3600 3600000 86400 )

NS dns.domain.com.

A a.b.c.d

MX 10 mail.domain.com.

firewall A a.b.c.d

mail A a.b.c.d

dns A a.b.c.d

加下面的行到/etc/hosts

192.168.11.1 mail.domain.com mail

192.168.11.5 firewall.domain.com firewall


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.