作者 主題: mail server log 出現大量的異常訊息  (閱讀 7777 次)

0 會員 與 1 訪客 正在閱讀本文。

Squawell

  • 懷疑的國中生
  • **
  • 文章數: 53
    • 檢視個人資料
mail server log 出現大量的異常訊息
« 於: 2013-08-26 20:49 »
大家好:
          小弟發現最近在MAIL上發現大量如下的LOG紀錄
代碼: [選擇]
Aug 26 20:41:23 mail postfix/qmgr[32052]: [color=red]E4B7BF39A2[/color]: to=<[color=green]callme@gmaill.com[/color]>, relay=none, delay=395806, delays=395786/20/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=gmaill.com type=MX: Host not found, try again)
代碼: [選擇]
Aug 18 07:01:32 mail postfix/qmgr[2829]: 14FE01D41C1: to=<[color=green]callme@aol.com[/color]>, relay=none, delay=78024, delays=78023/0.01/0/0, dsn=4.0.0, status=deferred (delivery temporarily suspended: host mailin-01.mx.aol.com[205.188.159.42] refused to talk to me: 554 mtain-dk05.r1000.mx.aol.com ESMTP not accepting connections)
其中綠色的地方會變換不同的網域名稱........

不知道這是何原因引起的??從上面資訊能找出是哪個帳號在做發信的動作嗎??小弟只看到TO並沒有發現有FROM的資訊在上面??

還請大家指教~謝謝

Squawell

  • 懷疑的國中生
  • **
  • 文章數: 53
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #1 於: 2013-08-26 21:05 »
小弟目前在 /var/spool/postfix/deferred/目錄下有找到一些資料...代號跟上一篇中的紅色標記起來的代號一樣.....

我想應該是可以從這邊下手去分析看看......

也想請教在這個目錄的郵件是什麼意思?發不出去還是??

還請大家給予指教~謝謝

日京三子

  • 全區板主
  • 俺是博士!
  • *****
  • 文章數: 8832
    • 檢視個人資料
    • http://www.24online.cjb.net
Re: mail server log 出現大量的異常訊息
« 回覆 #2 於: 2013-08-27 09:15 »
引用
Aug 26 20:41:23 mail postfix/qmgr[32052]: E4B7BF39A2: to=<callme@gmaill.com>, relay=none, delay=395806, delays=395786/20/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=gmaill.com type=MX: Host not found, try again)

引用
Aug 18 07:01:32 mail postfix/qmgr[2829]: 14FE01D41C1: to=<callme@aol.com>, relay=none, delay=78024, delays=78023/0.01/0/0, dsn=4.0.0, status=deferred (delivery temporarily suspended: host mailin-01.mx.aol.com[205.188.159.42] refused to talk to me: 554 mtain-dk05.r1000.mx.aol.com ESMTP not accepting connections)

看起來你的郵件伺服器 遇到了垃圾信件,然後在努力的退信。
哈克不愛的多合一輸入平台----->新香草口味
過去的時間不斷流逝,抹去的眼淚已成追憶;
乾枯的雙手無力阻止,再會了我遠去的曾經。

Squawell

  • 懷疑的國中生
  • **
  • 文章數: 53
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #3 於: 2013-08-27 19:31 »
引用
Aug 26 20:41:23 mail postfix/qmgr[32052]: E4B7BF39A2: to=<callme@gmaill.com>, relay=none, delay=395806, delays=395786/20/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=gmaill.com type=MX: Host not found, try again)

引用
Aug 18 07:01:32 mail postfix/qmgr[2829]: 14FE01D41C1: to=<callme@aol.com>, relay=none, delay=78024, delays=78023/0.01/0/0, dsn=4.0.0, status=deferred (delivery temporarily suspended: host mailin-01.mx.aol.com[205.188.159.42] refused to talk to me: 554 mtain-dk05.r1000.mx.aol.com ESMTP not accepting connections)

看起來你的郵件伺服器 遇到了垃圾信件,然後在努力的退信。
小弟目前的做法是把在/var/spool/postfix/deferred/底下的所有目錄都刪除,觀察LOG就比較沒再出現這些退信的資訊.....
不知有無方法可以找出有問題的帳號?或是postfix中可以怎麼設定會減少此類情況發生?
再次感謝^^

日京三子

  • 全區板主
  • 俺是博士!
  • *****
  • 文章數: 8832
    • 檢視個人資料
    • http://www.24online.cjb.net
Re: mail server log 出現大量的異常訊息
« 回覆 #4 於: 2013-08-28 10:34 »
引用
Aug 26 20:41:23 mail postfix/qmgr[32052]: E4B7BF39A2: to=<callme@gmaill.com>, relay=none, delay=395806, delays=395786/20/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=gmaill.com type=MX: Host not found, try again)

引用
Aug 18 07:01:32 mail postfix/qmgr[2829]: 14FE01D41C1: to=<callme@aol.com>, relay=none, delay=78024, delays=78023/0.01/0/0, dsn=4.0.0, status=deferred (delivery temporarily suspended: host mailin-01.mx.aol.com[205.188.159.42] refused to talk to me: 554 mtain-dk05.r1000.mx.aol.com ESMTP not accepting connections)

看起來你的郵件伺服器 遇到了垃圾信件,然後在努力的退信。
小弟目前的做法是把在/var/spool/postfix/deferred/底下的所有目錄都刪除,觀察LOG就比較沒再出現這些退信的資訊.....
不知有無方法可以找出有問題的帳號?或是postfix中可以怎麼設定會減少此類情況發生?
再次感謝^^

我們沒辦法主動去阻止這類的攻擊,但是依靠每天系統發出的LOG,可以觀察到系統重試的狀況,大概每天看個一兩次其實也就差不多了....

因為我們不太能確定敵人是故意的 DDOS 攻擊,或者是打錯字,網域錯誤,亦或者是對方主機離線關機維修中?
哈克不愛的多合一輸入平台----->新香草口味
過去的時間不斷流逝,抹去的眼淚已成追憶;
乾枯的雙手無力阻止,再會了我遠去的曾經。

西歪街

  • 鑽研的研究生
  • *****
  • 文章數: 695
  • 性別: 男
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #5 於: 2013-08-28 12:40 »
所以這就是我家設備存在的原因(茶

Squawell

  • 懷疑的國中生
  • **
  • 文章數: 53
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #6 於: 2013-08-28 20:29 »
引用
Aug 26 20:41:23 mail postfix/qmgr[32052]: E4B7BF39A2: to=<callme@gmaill.com>, relay=none, delay=395806, delays=395786/20/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=gmaill.com type=MX: Host not found, try again)

引用
Aug 18 07:01:32 mail postfix/qmgr[2829]: 14FE01D41C1: to=<callme@aol.com>, relay=none, delay=78024, delays=78023/0.01/0/0, dsn=4.0.0, status=deferred (delivery temporarily suspended: host mailin-01.mx.aol.com[205.188.159.42] refused to talk to me: 554 mtain-dk05.r1000.mx.aol.com ESMTP not accepting connections)

看起來你的郵件伺服器 遇到了垃圾信件,然後在努力的退信。
小弟目前的做法是把在/var/spool/postfix/deferred/底下的所有目錄都刪除,觀察LOG就比較沒再出現這些退信的資訊.....
不知有無方法可以找出有問題的帳號?或是postfix中可以怎麼設定會減少此類情況發生?
再次感謝^^

我們沒辦法主動去阻止這類的攻擊,但是依靠每天系統發出的LOG,可以觀察到系統重試的狀況,大概每天看個一兩次其實也就差不多了....

因為我們不太能確定敵人是故意的 DDOS 攻擊,或者是打錯字,網域錯誤,亦或者是對方主機離線關機維修中?
恩恩.....目前將上一篇中提到的目錄下的檔案刪除之後~maillog紀錄中該訊息就已經很少出現了....

另外請教如要在mail server上如何將使用者寄去某特定網域給禁止掉??

謝謝

phantom

  • SA 苦力組
  • 俺是博士!
  • *****
  • 文章數: 2185
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #7 於: 2013-09-02 14:11 »
既然是 postfix,研究一下下列的設定:

smtpd_recipient_restrictions =
        permit_sasl_authenticated
        permit_mynetworks
        reject_invalid_hostname
        reject_non_fqdn_sender
        reject_non_fqdn_recipient
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
        reject_unlisted_sender
        reject_rbl_client bl.spamcop.net
        reject_rbl_client xbl.spamhaus.org
        reject_unauth_destination

可以省掉很多麻煩。
Linux 非萬能, 沒 Linux 萬萬不能.
root = God
apt-get install ultimate-horsepower

Squawell

  • 懷疑的國中生
  • **
  • 文章數: 53
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #8 於: 2013-09-05 16:43 »
既然是 postfix,研究一下下列的設定:

smtpd_recipient_restrictions =
        permit_sasl_authenticated
        permit_mynetworks
        reject_invalid_hostname
        reject_non_fqdn_sender
        reject_non_fqdn_recipient
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
        reject_unlisted_sender
        reject_rbl_client bl.spamcop.net
        reject_rbl_client xbl.spamhaus.org
        reject_unauth_destination

可以省掉很多麻煩。
不好意思請教一下小弟查了一些資料google一下發現大部分最後結尾的地方都會在加上permit.....不知道是否世新版本需要這樣設定還是其他的原因?
謝謝︿︿

aeolus0829

  • 憂鬱的高中生
  • ***
  • 文章數: 112
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #9 於: 2013-09-09 09:13 »
建議樓上去google爬一下那些設定的意思

用意是阻擋垃圾信

smtpd_recipient_restriction 是檢查收件人欄位 (比較正確的說法是在 RCPT TO 時做檢查)

permit_sasl_authenticated
允許通過 sasl 驗證的寄件者

permit_mynetworks
允許 mynetwork ,這是自己設定的,通常是內部網段或特定的 MAIL SERVER IP


Squawell

  • 懷疑的國中生
  • **
  • 文章數: 53
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #10 於: 2013-09-09 21:59 »
建議樓上去google爬一下那些設定的意思

用意是阻擋垃圾信

smtpd_recipient_restriction 是檢查收件人欄位 (比較正確的說法是在 RCPT TO 時做檢查)

permit_sasl_authenticated
允許通過 sasl 驗證的寄件者

permit_mynetworks
允許 mynetwork ,這是自己設定的,通常是內部網段或特定的 MAIL SERVER IP
小弟有先google過~只是不明白之前在設定的時候並沒有發現結尾有加上permit這個單字~
但是最近的google卻發現大部分都有在結尾加上permit這個單字才想說是新版本有這樣設定嗎??
因為小弟沒那樣設定一樣是可以運作沒錯誤產生....還請知道的學長釋疑一下...謝謝^^

aeolus0829

  • 憂鬱的高中生
  • ***
  • 文章數: 112
    • 檢視個人資料
Re: mail server log 出現大量的異常訊息
« 回覆 #11 於: 2013-09-10 10:41 »
小弟有先google過~只是不明白之前在設定的時候並沒有發現結尾有加上permit這個單字~
但是最近的google卻發現大部分都有在結尾加上permit這個單字才想說是新版本有這樣設定嗎??
因為小弟沒那樣設定一樣是可以運作沒錯誤產生....還請知道的學長釋疑一下...謝謝^^
[/quote]

就古早以前對 postfix 的 main.cf 所做的設定
設定是有先後順序的分別的(就像防火牆的規則一樣)

前面做了許多 reject 的動作,當信件符合其中一個 reject 的條件時,postfix 會做退信動作
若不符合就繼續檢查
當信件通過前面所有的條件時,最後面給個 permit ,postfix 就允許信件進來
但其實 smtpd_recipient_restrictions 並不需要在最後加上 permit 的指令;實務上我是沒有在最後加 permit ,通過 reject 的檢查,信件就會被收下來
smtpd_recipient_restrictions 這個指令並沒有新舊版設定的差別,就我在 postfix 爬文的結果,2.1 以前用的是另外一個指令 smtpd_relay_restrictions,設定的方法我就沒去細看了