关闭来自 abrt(自动错误报告工具)的电子邮件通知

Ban*_*jer 7 linux centos centos6.2

我正在配置 CentOS 6.2,并且看到了一些“[abrt] 完整崩溃报告”电子邮件。我知道 abrt 对创建崩溃转储很有用,而其他什么不是,所以我不想禁用该服务,我只想停止接收崩溃报告电子邮件。

我可能需要在 /etc/abrt/abrt.conf 中的配置文件中添加一些内容。我似乎在搜索中找不到任何东西。任何的想法?谢谢。

编辑:

这是我的 abrt.conf,它相当简单。

[root@myhost~]# cat /etc/abrt/abrt.conf
# Enable this if you want abrtd to auto-unpack crashdump tarballs which appear
# in this directory (for example, uploaded via ftp, scp etc).
# Note: you must ensure that whatever directory you specify here exists
# and is writable for abrtd. abrtd will not create it automatically.
#
#WatchCrashdumpArchiveDir = /var/spool/abrt-upload

# Max size for crash storage [MiB] or 0 for unlimited
#
MaxCrashReportsSize = 1000

# Specify where you want to store coredumps and all files which are needed for
# reporting. (default:/var/spool/abrt)
#
#DumpLocation = /var/spool/abrt
Run Code Online (Sandbox Code Playgroud)

以及 /etc/abrt 的列表:

[root@myhost~]# ls -la /etc/abrt
total 32
drwxr-xr-x.  3 root root  4096 Apr 13 06:14 .
drwxr-xr-x. 97 root root 12288 Apr 13 03:50 ..
-rw-r--r--.  1 root root   527 Dec 13 22:50 abrt-action-save-package-data.conf
-rw-r--r--.  1 root root   572 Dec 13 22:50 abrt.conf
-rw-r--r--.  1 root root   175 Dec 13 22:50 gpg_keys
drwxr-xr-x.  2 root root  4096 Apr 13 06:13 plugins

[root@myhost~]# ls -la /etc/abrt/plugins/
total 12
drwxr-xr-x. 2 root root 4096 Apr 13 06:13 .
drwxr-xr-x. 3 root root 4096 Apr 13 06:14 ..
-rw-r--r--. 1 root root  278 Dec 13 22:50 CCpp.conf
Run Code Online (Sandbox Code Playgroud)

实际上,上面所有这些 conf 文件都只有几行,并且没有提及任何有关邮件、电子邮件或通知的内容。

更新

由于我已禁用abrtd,我一直在 /var/log/messages 中看到这些:

myhost abrt: abrt daemon is not running. If it crashed, /proc/sys/kernel/core_pattern contains a stale value, consider resetting it to 'core'
Run Code Online (Sandbox Code Playgroud)

停止服务的正确方法abrt是:

service abrt-ccpp stop
chkconfig abrt-ccpp off
Run Code Online (Sandbox Code Playgroud)

And*_*ase 7

我在运行 RHEL 6.2 时遇到了同样的问题。在使用的 abrt 版本中,Mailx 似乎不是一个单独的模块。我发现最好的方法是将程序添加到黑名单/etc/abrt/abrt-action-save-package-data.conf

BlackList = program1, program2, program3
Run Code Online (Sandbox Code Playgroud)

(后跟service abrtd restart

或者通过一起禁用 abrt :

# chkconfig abrtd off

(后跟service abrtd stop


Sco*_*ack 5

您可能会收到这些,因为已安装 abrtd 的 mailx 插件。可以通过多种不同的方式调用它,因此您需要做的是在您的/etc/abrt/abrtd.conf文件中查找字符串“Mailx”的实例并删除这些行。例如,您可能会看到:

ActionsAndReporters = Mailx("[abrt] a crash occurs") 
Run Code Online (Sandbox Code Playgroud)

它告诉 abrtd 通过电子邮件发送每次崩溃的报告,或者您可以看到

CCpp:httpd = Mailx("[abrt] Apache crash") 
Run Code Online (Sandbox Code Playgroud)

这会导致 abrtd 在进程 httpd 崩溃时通过电子邮件发送警报。

因此,查看您的配置文件中是否有任何此类被调用的 Mailx 实例,然后删除,重新启动 abrtd,您应该没问题。

  • 对于这样一个有用的守护进程来说,这样一种笨拙的配置方法。 (2认同)