歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> Linux下的sendmail簡介

Linux下的sendmail簡介

日期:2017/2/27 9:41:21   编辑:更多Linux
  sendmail是電子郵件系統。安裝時,其默認的配置文件sendmail.cf文件將被安裝在/etc下。該配置文件可工作於僅使用SMTP的站點。而不能工作於UUCP站點;如果您要使用UUCP進行郵件傳輸就得重新生成一個新的sendmail.cf。這樣的話,您就需要安裝m4和sendmail的源代碼包。請您閱讀sendmail 源代碼中的README以獲取更為詳盡的創建snedmail配置文件的方法。也可以看 O'Reilly&Associates出版的一本有關sendmail的不錯的參考書(作者:Bryan Costales).一種常用的sendmail的配置用一台機器作為網絡中所有主機的郵件網關。打個比方,在紅帽子軟件公司我們有一台地址為mail.redhat.com的機器來處理我們所有的郵件。我們只需簡單的將mail.redhat.com要處理郵件的機器的名字加入/etc/sendmail.cw。下面是該文件的一個例子:

# sendmail.cw - include all aliases for your machine # here. torgo.redhat.com poodle.redhat.com devel.redhat.com同樣在torgo,poodle和devel的那些機器中編輯/etc/sendmail.cf,使其象mail.redhat.com 那樣發送郵件,轉發本地的郵件給redhat.com。 編輯含DH和DM的那些行:

# who I send unqualified names to # (null means deliver locally) DRmail.redhat.com # who gets all local email traffic DHmail.redhat.com # who I masquerade as (null for no masquerading) DMredhat.com以這種配置,所有發出的郵件都好象是叢redhat.com發出的,而任何發往torgo.redhat.com 和其它機器的郵件都將發送給mail.redhat.com請注意,如果您將您的系統配置為以另一機器身份發送郵件的話,任何以本系統為目的的郵件都將被發送至那台主機。比如,由cron進程定期產生的發網[email protected] 日志文件都將發送給[email protected]




Copyright © Linux教程網 All Rights Reserved