自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

看中小型企業(yè)如何配置Sendmail 實(shí)例介紹

運(yùn)維 系統(tǒng)運(yùn)維
Sendmail是 FreeBSD 中的默認(rèn)郵件傳輸代理 (MTA)。 sendmail 的任務(wù)是從郵件用戶代理 (MUA) 接收郵件然后根據(jù)配置文件的定義把它們送給配置好的的寄送程序。 sendmail 也能接受網(wǎng)絡(luò)連接,并且發(fā)送郵件到本地郵箱或者發(fā)送它到其它程序。我?guī)Т蠹铱纯粗行∑髽I(yè)是如何配置Sendmail

其實(shí)中小企業(yè)配置Sendmail 無非就是那么幾步,其實(shí)很簡(jiǎn)單,請(qǐng)看下文。

  我們假定該企業(yè)采用專線接入Internet,有兩臺(tái)Linux服務(wù)器(Redhat 6.1 )

一臺(tái)作為防火墻直接接入Chinanet,是通向Internet的***出入口,同時(shí)也作為DNS/SMTP 服務(wù)器,且申請(qǐng)了域名domain.com,由該防火墻服務(wù)器(DNS服務(wù)器)對(duì)域domain.com進(jìn)行解析。另一臺(tái)郵件服務(wù)器是在內(nèi)部網(wǎng)段運(yùn)行,完全與外部世界無關(guān)。作為內(nèi)部局域網(wǎng)上用戶的收/發(fā)郵件服務(wù)器。

  地址:假定防火墻Linux服務(wù)器的***外部地址為a.b.c.d(eth0),內(nèi)部網(wǎng)卡地址

192.168.11.5(eth1),機(jī)器名為firewall.domain.com, 內(nèi)部的郵件服務(wù)器地址為192.168.11.1,機(jī)器名為mail.domain.com , 且注冊(cè)域時(shí)填寫的主機(jī)名為dns.domain.com(a.b.c.d) .

  思路:先配置DNS服務(wù)器,用來解析@domain.com的域名,并指明MX記錄到內(nèi)部郵件主機(jī)mail.domain.com. 把這臺(tái)防火墻僅作為mail relay主機(jī),任何從外部

世界發(fā)往@domain.com域的郵件均由它處理且relay到內(nèi)部郵件主機(jī),僅接受@domain.com后綴的郵件進(jìn)入,這樣阻止了spammer發(fā)送垃圾郵件。

  在內(nèi)部郵件服務(wù)器上,配置Sendmail的DS部分為firewall.domain.com,任何發(fā)往非內(nèi)部員工的郵件直接送往firewall.domain.com,且設(shè)置domain.com為

  本地域,任何發(fā)往@domain.com域的郵件被內(nèi)部別名處理并送往內(nèi)部各用戶的郵件緩沖池中。

  旅行用戶的考慮:

  若公司員工出差在外需從公司的服務(wù)器接收郵件,一種方法是直接撥當(dāng)?shù)豂SP,然后設(shè)置接收郵件服務(wù)器為mail.domain.com,但要求mail.domain.com在外地被解析成防火墻的外部***地址,這樣再在防火墻上設(shè)置plug-gw代理,代理任何到防火墻外部地址的110端口的請(qǐng)求到內(nèi)部192.168.11.1的110端口。另一種方法,也可以再建一服務(wù)器為L(zhǎng)inux撥入服務(wù)器,直接撥到公司來接收郵件。

  重點(diǎn):Sendmail的各項(xiàng)配置及相關(guān)設(shè)置

  一:防火墻上的Sendmail配置

  我們采用Redhat Linux 6.1 加 Sendmail 8.9.3作為操作環(huán)境:

  安裝操作系統(tǒng)和防火墻的配置略,建議采用3c905b或者Intel pro100 的網(wǎng)卡,先配置DNS。

  設(shè)置/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

#p#

  二、下面配置Sendmail,首先要先創(chuàng)建一個(gè)用來生成/etc/sendmail.cf的sendmail.mc文件

  在Redhat 安裝的過程中有一個(gè)默認(rèn)地redhat.mc在/usr/lib/sendmail-cf/cf目錄下。

  我們修改為如下:

  divert(-1)

  dnl This is the macro config file used to generate the /etc/sendmail.cf

  dnl file. If you modify thei file you will have to regenerate the

  dnl /etc/sendmail.cf by running this macro config through the m4

  dnl preprocessor:

  dnl

  dnl m4 /etc/sendmail.mc > /etc/sendmail.cf

  dnl

  dnl You will need to have the sendmail-cf package installed for this to

  dnl work.

  include(`../m4/cf.m4')

  define(`confDEF_USER_ID',``8:12'')

  OSTYPE(`linux')

  undefine(`UUCP_RELAY')

  undefine(`BITNET_RELAY')

  define(`confAUTO_REBUILD')

  define(`confTO_CONNECT', `1m')

  define(`confTRY_NULL_MX_LIST',true)

  define(`confDONT_PROBE_INTERFACES',true)

  define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')

  define(`ALIAS_FILE',`/etc/mail/aliases')

  FEATURE(`smrsh',`/usr/sbin/smrsh')

  FEATURE(`mailertable',`hash -o /etc/mail/mailertable')

  FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')

  FEATURE(`domaintable',`hash -o /etc/mail/domaintable')

  FEATURE(redirect)

  FEATURE(always_add_domain)

  FEATURE(use_cw_file)

  FEATURE(local_procmail)

  MAILER(procmail)

  MAILER(smtp)

  FEATURE(`access_db')

  FEATURE(`blacklist_recipients')

  dnl We strongly recommend to comment this one out if you want to protect

  dnl yourself from spam. However, the laptop and users on computers that do

  dnl not hav 24x7 DNS do need this.

  dnl FEATURE(`accept_unresolvable_domains')

  dnl FEATURE(`relay_based_on_MX')

  然后用m4 redhat.mc > sendmail.cf生成sendmail.cf放到/etc目錄下。且做如下操作:

  1. 更改/etc/sendmail.cf中Fw定義為Fw/etc/mail/sendmail.cw

  并創(chuàng)建一個(gè)空文件sendmail.cw (#touch /etc/mail/sendmail.cw)

  2. 更改/etc/mail/mailertable象下面這樣:

  domain.com relay:[192.168.11.1]

  并運(yùn)行makemap hash /etc/mail/mailertable.db

怎么樣,看完這篇文章了解到?jīng)],中小企業(yè)是如何配置sendmail的么。希望對(duì)你們有用!

【編輯推薦】

  1. Sendmail 配置文件(一)
  2. Sendmail 配置文件(二)
  3. Sendmail 配置實(shí)例介紹
  4. 用sendmailanalyzer來監(jiān)控自己的Sendmail服務(wù)器
  5. Solaris 10下可以用Sendmail發(fā)送郵件
  6. Sendmail簡(jiǎn)單介紹
  7. 圖文并茂 講解Sendmail工作環(huán)境
責(zé)任編輯:趙鵬 來源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2009-09-25 16:36:04

2011-02-24 09:56:26

組網(wǎng)網(wǎng)絡(luò)

2018-11-08 09:10:18

組網(wǎng)光纖網(wǎng)絡(luò)

2010-08-17 11:42:05

2009-12-21 15:03:03

路由器配置

2018-10-08 05:23:20

2009-07-11 14:46:44

ADSL光纖企業(yè)

2014-09-28 14:28:12

硬盤加密全盤加密

2010-08-23 12:12:58

2013-09-30 10:01:19

中小企業(yè)關(guān)鍵業(yè)務(wù)應(yīng)用

2022-03-10 11:48:13

云服務(wù)器服務(wù)器

2009-12-30 14:28:01

2010-08-24 10:04:45

中小型企業(yè)虛擬化

2009-11-24 09:51:22

路由設(shè)計(jì)方案

2012-03-30 16:43:59

云計(jì)算中小企業(yè)安全

2019-12-10 08:50:27

網(wǎng)絡(luò)攻擊網(wǎng)絡(luò)安全漏洞

2010-08-25 17:45:21

2014-04-30 11:04:42

SDN軟件定義網(wǎng)絡(luò)

2020-11-13 19:11:53

上云企業(yè)成本

2022-03-12 19:12:56

FlexeraAWSAzure
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)