作者 主題: [最佳][問題]請問sendmail的問題???  (閱讀 4503 次)

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

Higojump

  • 憂鬱的高中生
  • ***
  • 文章數: 103
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 於: 2003-08-27 08:53 »
最近每天都有這樣的log
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 27
rejecting connections on daemon MTA: load average: 31
rejecting connections on daemon MTA: load average: 32
rejecting connections on daemon MTA: load average: 31
rejecting connections on daemon MTA: load average: 29
rejecting connections on daemon MTA: load average: 28
rejecting connections on daemon MTA: load average: 28
rejecting connections on daemon MTA: load average: 28
rejecting connections on daemon MTA: load average: 26
rejecting connections on daemon MTA: load average: 26
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 25
rejecting connections on daemon MTA: load average: 24
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 23
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 22
rejecting connections on daemon MTA: load average: 21
rejecting connections on daemon MTA: load average: 19
rejecting connections on daemon MTA: load average: 16
rejecting connections on daemon MTA: load average: 14
rejecting connections on daemon MTA: load average: 13
rejecting connections on daemon MTA: load average: 12
accepting connections again for daemon MTA
檢查cpu,ram負載
#ps -aux | awk 'BEGIN{C=0;R=0} $NR!=1{C+=$3;R+=$4} END{print "cpu:"C"\tram:"R;}'

cpu:0   ram:63.4

#free
             total       used       free     shared    buffers     cached
Mem:        255592     249844       5748         64      36528     130260
-/+ buffers/cache:      83056     172536
Swap:      1052216        852    1051364

請問這樣的負載算正常嗎?
------------------------------
大雄這一生中只愛過兩個男人
胖虎跟小夫
-------------------------------

Higojump

  • 憂鬱的高中生
  • ***
  • 文章數: 103
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #1 於: 2003-08-27 23:01 »
解決了~~~
------------------------------
大雄這一生中只愛過兩個男人
胖虎跟小夫
-------------------------------

reggie

  • 活潑的大學生
  • ***
  • 文章數: 386
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #2 於: 2003-08-28 01:04 »
how did you fix it?

wilson

  • 俺是博士!
  • *****
  • 文章數: 1821
  • 帥氣柴老大
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #3 於: 2003-08-28 01:08 »
對阿~~~小弟也很想知道~~

abelyang

  • 酷!學園 學長們
  • 俺是博士!
  • *****
  • 文章數: 1097
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #4 於: 2003-08-28 02:01 »
引用
rejecting connections on daemon MTA: load average

我猜想:
這種問題還是 Mail Loading 太高或 mail traffic 太多的關係造成的
原因可能被 SPAM ( Open Relay or Open Proxy ) , 或瞬間 SMTP 流量大增所致
(或系統當時 uptime 太高,也有可能跑 mail filter 之類的東西)

除了先停掉 mail , 並適當的清 mqueue , 再 restart mail (或找出造成 high loading 的原因)

不過確實情況還得看 Higojump 兄的解答囉 ....
不過還有一個重點時, Higojump 兄找到問題所在的過程,也是可以分享給大家的經驗哦

netman

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 17465
    • 檢視個人資料
    • http://www.study-area.org
[最佳][問題]請問sendmail的問題???
« 回覆 #5 於: 2003-08-28 02:03 »
還是,太多"病毒"郵件把 server 拖垮了?

Higojump

  • 憂鬱的高中生
  • ***
  • 文章數: 103
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #6 於: 2003-08-28 10:54 »
解決方法說出來有點丟臉:
基本上那台mail的功能就是在每天凌晨四點寄兩封log信給我,除此之外沒別的功能
.而且除了我之外其它ip都會被防火牆擋掉,而我看log的確每天寄兩封,在凌晨四點多,如下:
 --------------------- sendmail Begin ------------------------
2211 bytes transferred
2 messages sent
有發生這樣的錯誤訊息是在這個月的8,21,25,26號,的10點,11點,下午1點左右,那個時間伺服器loading本來就比較重,而且基本上和我寄log信沒有衝突.
所以我就寫一個crond在每天一點跟七點執行
#!/bin/sh
if [ `date +%H` -gt 6 ]
then
/sbin/service sendmail stop
else
/sbin/service sendmail start
fi
這樣算有解決嗎?
------------------------------
大雄這一生中只愛過兩個男人
胖虎跟小夫
-------------------------------

abelyang

  • 酷!學園 學長們
  • 俺是博士!
  • *****
  • 文章數: 1097
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #7 於: 2003-08-28 11:08 »
如果您覺得可以解決問題~那就是好方法~不論方法的好壤

# load average at which we just queue messages
O QueueLA=8
# load average at which we refuse connections
O RefuseLA=12
# load average at which we delay connections; 0 means no limit
O DelayLA=0

看您的第一篇 LA 先衝....慢慢昇高, 最後回到 12 以下後就沒有了

QueueLA ,
超過 8 就 queue 信
超過 12 就 refuse

DelayLA ..大概巳經懂了吧

注意您系統的 LA 變化 (如果可以用 mrtg 畫出來就更好判斷)
適度的調整這些值, 上面都是 sendmail 的預設值

若是我,則會 Q LA 不變,但 R LA 調高一點, D LA 大約近於 Q LA 供您參考看看

Higojump

  • 憂鬱的高中生
  • ***
  • 文章數: 103
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #8 於: 2003-08-28 11:32 »
我sendmail.cf
# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA=12
<==註解掉了?
------------------------------
大雄這一生中只愛過兩個男人
胖虎跟小夫
-------------------------------

abelyang

  • 酷!學園 學長們
  • 俺是博士!
  • *****
  • 文章數: 1097
    • 檢視個人資料
[最佳][問題]請問sendmail的問題???
« 回覆 #9 於: 2003-08-28 11:36 »
是註解掉了~但那幾個值也是預設值~~
拿掉 # , 並改成你要的值
建議你不要一次調太高, 慢慢加上去,比較好

因為大家並不了解您的系統及機器狀況,漸近會較好哦

要處理好sendmail , 最好是將 Option 都看過一遍
有病治病, 沒病也強身呀