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

Sendmail配置策略

運(yùn)維 系統(tǒng)運(yùn)維
Sendmail.cf是Sendmail的配置文件,它全權(quán)決定了Sendmail的屬性。這個(gè)文件定義郵件服務(wù)器為哪個(gè)域工作。其中的內(nèi)容為特定宏,大多數(shù)人對(duì)它都抱有恐懼心理,因?yàn)槲募械暮甏a實(shí)在是太多。

Sendmail.cf是Sendmail 配置文件,它全權(quán)決定了Sendmail的屬性。這個(gè)文件定義郵件服務(wù)器為哪個(gè)域工作。其中的內(nèi)容為特定宏,大多數(shù)人對(duì)它都抱有恐懼心理,因?yàn)槲募械暮甏a實(shí)在是太多。sendmail.cf通常是由一個(gè)以mc結(jié)尾的文件編譯產(chǎn)生。如Redhat自帶一個(gè)redhat.mc,用戶可以自己修改其中的一些設(shè)置,使之適合自己。


筆者的sendmail.mc 文件內(nèi)容如下:

  1. divert(-1)  
  2. dnl This is the macro config file used to generate the /etc/sendmail.cf  
  3. dnl file. If you modify thei file you will have to regenerate the  
  4. dnl /etc/sendmail.cf by running this macro config through the m4  
  5. dnl preprocessor:  
  6. dnl m4 /etc/sendmail.mc > /etc/sendmail.cf  
  7. dnl You will need to have the Sendmail-cf package installed for this to work.  
  8. include(`/usr/lib/Sendmail-cf/m4/cf.m4')  
  9. define(`confDEF_USER_ID',``8:12'')  
  10. OSTYPE(`linux')  
  11. undefine(`UUCP_RELAY')  
  12. undefine(`BITNET_RELAY')  
  13. define(`confAUTO_REBUILD')  
  14. define(`confTO_CONNECT', `1m')  
  15. define(`confTRY_NULL_MX_LIST',true)  
  16. define(`confDONT_PROBE_INTERFACES',true)  
  17. define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')  
  18. FEATURE(`smrsh',`/usr/sbin/smrsh')  
  19. FEATURE(`mailertable',`hash -o /etc/mail/mailertable')  
  20. FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')  
  21. FEATURE(redirect)  
  22. FEATURE(always_add_domain)  
  23. FEATURE(use_cw_file)  
  24. FEATURE(local_procmail)  
  25. MAILER(smtp)  
  26. MAILER(procmail)  
  27. FEATURE(`access_db')  
  28. FEATURE(`blacklist_recipients')  
  29. dnl We strongly recommend to comment this one out if you want to protect  
  30. dnl yourself from spam. However, the laptop and users on computers that do  
  31. dnl not hav 24x7 DNS do need this.  
  32. FEATURE(`accept_unresolvable_domains')  
  33. dnl FEATURE(`relay_based_on_MX')   

 

Sendmail配置編譯sendmail.mc以產(chǎn)生需要的sendmail.cf文件:# m4 /etc/sendmail.mc > /etc/mail/sendmail.cf。

生成sendmail.cf以后,編輯sendmail.cf。在文件中,查找DS,在其后加入郵件服務(wù)器名、域名,這樣可以保證當(dāng)你以u(píng)sername@mail.domain.com或username@domain.com發(fā)信時(shí),用戶都可以收到,如下所示:

# Alias for this host
Cw mail.domain.com domain.com

然后,就可以啟動(dòng)Sendmail了:# /usr/sbin/Sendmail -bd -q20m。

Sendmail 8.9.x以后的版本,在缺省情況下,都默認(rèn)不對(duì)未驗(yàn)證的計(jì)算機(jī)進(jìn)行轉(zhuǎn)發(fā)(Relay),所以如果要為本機(jī)以外的其他計(jì)算機(jī)進(jìn)行郵件轉(zhuǎn)發(fā),這時(shí),應(yīng)該在相應(yīng)的配置文件中明確告訴Sendmail配置要對(duì)哪幾個(gè)主機(jī)進(jìn)行轉(zhuǎn)發(fā)。如果不考慮驗(yàn)證,對(duì)任何主機(jī)都進(jìn)行轉(zhuǎn)發(fā)的話,可以在sedmail.mc文件中加入一行:FEATURE(promiscuous_relay)。

不過,如果你的計(jì)算機(jī)是放在公網(wǎng)上的話,建議你不要這樣做,因?yàn)檫@樣做了以后,任何人都可以使用你的計(jì)算機(jī)進(jìn)行轉(zhuǎn)發(fā)郵件了,特別是一些別有用心的人或一些兜售客(spammer,垃圾郵件制造者)會(huì)利用你的郵件服務(wù)器的轉(zhuǎn)發(fā)功能亂發(fā)大量的垃圾郵件。

【編輯推薦】

  1. Linux sendmail配置、安裝和測(cè)試
  2. 使用php sendmail Windows下配置方法
  3. Sendmail 配置E-Mail服務(wù)器實(shí)現(xiàn)E-Mail靈活運(yùn)用
  4. Sendmail 配置E-Mail服務(wù)器開啟SMTP、POP端口
  5. Sendmail 安裝RPM包和編譯源碼

 

責(zé)任編輯:chenqingxiang 來源: LINUX寶庫(kù)
相關(guān)推薦

2011-01-21 09:32:57

LinuxSendmail

2011-01-21 15:40:56

Sendmail

2011-01-19 10:57:54

sendmail配置

2010-06-03 13:21:46

Sendmail 配置

2011-01-21 15:27:10

Sendmail

2011-01-18 14:24:03

Linuxsendmail配置

2010-05-25 15:43:07

Sendmail配置

2011-01-21 15:08:45

Sendmail

2010-06-07 10:41:25

2010-06-07 10:01:26

Linux sendm

2011-01-18 16:23:23

2010-06-03 13:56:54

Sendmail 配置

2010-06-03 13:49:04

Sendmail 配置

2011-01-19 10:48:38

sendmail配置

2010-06-07 09:47:34

php sendmai

2011-01-19 10:32:09

sendmail配置

2010-06-02 16:31:28

Linux sendm

2010-05-25 16:03:18

sendmail配置

2010-06-02 16:10:04

php sendmai

2010-06-02 14:19:50

Sendmail 配置
點(diǎn)贊
收藏

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