HGIGA Service Docs 
» 遊客:  註冊 | 登錄 | 統計 | 幫助
RSS 訂閱當前論壇  

上一主題 下一主題
       
標題: [SOP] Sendmail 透過 SMTP Server 主機且作 SMTP 認證來發信出去  
 
service.support





UID 14
精華 0
積分 0
帖子 523
閱讀權限 200
註冊 2006-10-2
狀態 離線
[SOP] Sendmail 透過 SMTP Server 主機且作 SMTP 認證來發信出去

說明: 建議使用附件的 SOP.txt 來 copy & paste command 比較不會有問題!!!

假設 Sendmail 發信出去, 只能透過某一台 Mail Server, 並且需要 SMTP 認證通過才能發信, Sendmail 設定的 SOP 如下:

1. 修改 /etc/mail/sendmail.mc 檔, 加上 FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl
    # cd /etc/mail
    # vi sendmail.mc
    利用搜尋功能, 找到第一個出現 FEATURE 的那一行, 加在該行上面
    FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

2. 先備份原來的 sendmail.cf
    # cd /etc/mail
    # cp sendmail.cf sendmail.cf.bakup.2013
    # m4 sendmail.mc > sendmail.cf

3. 修改 sendmail.cf 中的一些參數, 將之註解起來, 才不會有問題
    # cd /etc/mail
    # vi sendmail.cf
        O StatusFile=/etc/mail/statistics
        改為
        #O StatusFile=/etc/mail/statistics
        ....
        O InputMailFilters=milter-cli
        改為
        #O InputMailFilters=milter-cli
        ...
        DS
        改為
        DS[192.168.16.230]        ## mail server 的 IP Address, 務必要加中括號

4.     建立 /etc/mail/auth 目錄, 並設定 SMTP 認證
    # cd /etc/mail
    # mkdir auth
    # chmod 700 auth
    # cd auth
    # vi client-info
        AuthInfo:[192.168.16.230] "U:athena" "I:athena" "P:123456"
    # makemap hash client-info < client-info
      # chmod 600 client-info*    ## 有帳密, 限定只有 root 可讀取

5. 重啟 Sendmail 服務
      # /etc/rc.d/init.d/sendmail restart
      
6. 發信測試


 附件: 您所在的用戶組無法下載或查看附件
2013-3-26 11:02#1
查看資料  Blog  發短消息  Yahoo!  頂部
       


  可打印版本 | 推薦給朋友 | 訂閱主題 | 收藏主題  


 

   Powered by Discuz! 4.1.0  © 2001-2006 Transformed by wxxslt for HGIGA Inc. / Service Support
Processed in 0.014644 second(s), 8 queries , Gzip enabled

所有時間為 GMT+8, 現在時間是 2024-5-19 04:57