Logwatch 报警,发送邮箱超出40MB限制 sendmail-largeboxes (large mail spool files) 的解决方法

logwatch 每日日志里提示:

 --------------------- sendmail-largeboxes (large mail spool files) Begin ------------------------ 

 Large Mailbox threshold: 40MB (41943040 bytes)
  Warning: Large mailbox: www-data (42320534)
 
 ---------------------- sendmail-largeboxes (large mail spool files) End ------------------------- 

也就是MailBox 阈值为40MB, 现在已经超出此阈值了。

我需要保留这些邮件,所以方案是增加此阈值警告,方法如下:

编辑配置文件: /usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf  

将其中的 $sendmail_largeboxes_size = 40MB 改为4GB,如下:

###########################################################################
# $Id$
###########################################################################

# This displays a warning for large mailboxes
# Best solution would be to have a config setting for what the
# server administrator considers as "large".  Hard coded to consider 40Mb+
# as large.

# You can put comments anywhere you want to.  They are effective for the
# rest of the line.

# this is in the format of <name> = <value>.  Whitespace at the beginning
# and end of the lines is removed.  Whitespace before and after the = sign
# is removed.  Everything is case *insensitive*.

# Yes = True  = On  = 1
# No  = False = Off = 0

# service title
Title = "sendmail-largeboxes (large mail spool files)"

# Which logfile group...
LogFile = NONE

# Mailbox size threshold
#   can add units KB, MB, GB, TB
#   can set to 0 to report spool files being created where they shouldn't

$sendmail_largeboxes_size = 40MB
########################################################
# This was written and is maintained by:
#    Colin Smith <Colin.Smith@fantasie.org.uk>
#
"/usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf" 39 lines, 1311 bytes

 

然后再运行logwatch ,上面的邮箱超出限制的警告消失了。

评论列表: