aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2018-02-19 13:54:39 -0500
committerBryn M. Reeves <bmr@redhat.com>2018-05-09 11:42:27 +0100
commitcc6d132583b7286e2cc14805e49dbc99651ef603 (patch)
tree8efecef0581be3c1614e428006f0b82a62f5963e
parentac0d549cce821b2d01d5c2aa1442b30f858e4d17 (diff)
downloadsos-cc6d132583b7286e2cc14805e49dbc99651ef603.tar.gz
[postfix|sendmail] Add mailq output
Adds collection of mailq output to the postfix and sendmail plugins. Sendmail also collects 'mailq -Ac'. Additionally, cleanup redundant checks and add_copy_spec in sendmail plugin. Resolves: #1219 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/postfix.py5
-rw-r--r--sos/plugins/sendmail.py20
2 files changed, 13 insertions, 12 deletions
diff --git a/sos/plugins/postfix.py b/sos/plugins/postfix.py
index 0a5ee1a7..b2a7432e 100644
--- a/sos/plugins/postfix.py
+++ b/sos/plugins/postfix.py
@@ -28,7 +28,10 @@ class Postfix(Plugin):
"/etc/postfix/main.cf",
"/etc/postfix/master.cf"
])
- self.add_cmd_output("postconf")
+ self.add_cmd_output([
+ 'postconf',
+ 'mailq'
+ ])
class RedHatPostfix(Postfix, RedHatPlugin):
diff --git a/sos/plugins/sendmail.py b/sos/plugins/sendmail.py
index 811804f5..510d1cd2 100644
--- a/sos/plugins/sendmail.py
+++ b/sos/plugins/sendmail.py
@@ -23,33 +23,31 @@ class Sendmail(Plugin):
plugin_name = "sendmail"
profiles = ('services', 'mail')
-
packages = ('sendmail',)
+ def setup(self):
+ self.add_copy_spec("/etc/mail/*")
+ self.add_cmd_output([
+ 'mailq',
+ 'mailq -Ac'
+ ])
+
class RedHatSendmail(Sendmail, RedHatPlugin):
files = ('/etc/rc.d/init.d/sendmail',)
- packages = ('sendmail',)
def setup(self):
super(RedHatSendmail, self).setup()
- self.add_copy_spec([
- "/etc/mail/*",
- "/var/log/maillog"
- ])
+ self.add_copy_spec('/var/log/maillog')
class DebianSendmail(Sendmail, DebianPlugin, UbuntuPlugin):
files = ('/etc/init.d/sendmail',)
- packages = ('sendmail',)
def setup(self):
super(DebianSendmail, self).setup()
- self.add_copy_spec([
- "/etc/mail/*",
- "/var/log/mail.*"
- ])
+ self.add_copy_spec("/var/log/mail.*")
# vim: set et ts=4 sw=4 :