Skip to content

[exim] Add plugin for the Exim mail transfer agent - #4422

Open
suraj-cmd wants to merge 1 commit into
sosreport:mainfrom
suraj-cmd:add-exim-plugin
Open

[exim] Add plugin for the Exim mail transfer agent#4422
suraj-cmd wants to merge 1 commit into
sosreport:mainfrom
suraj-cmd:add-exim-plugin

Conversation

@suraj-cmd

Copy link
Copy Markdown
Contributor

sos has plugins for postfix, sendmail and dovecot, but nothing for exim, and no
other plugin references it. Exim is the default MTA on Debian and Ubuntu and is
also packaged for Fedora and EPEL, so an sosreport from one of those hosts
currently contains no mail configuration, queue state or logs.

The layout differs enough between distributions to need subclasses: Red Hat
ships a single /etc/exim/exim.conf with logs named main.log, reject.log
and panic.log under /var/log/exim, while Debian uses the split
configuration under /etc/exim4 with mainlog, rejectlog and paniclog
under /var/log/exim4, and the exim4 unit name.

Common to both, the plugin runs exim -bV for the build and configuration
summary and exim -bp for the queue.

The passwd and passwd.client maps hold SMTP authentication credentials in
cleartext, including those used to relay through a smarthost. Both are added to
the forbidden paths in each subclass so they cannot be collected under any
option combination.

I do not have an exim deployment to test against. The Debian log filenames and
the exim4 unit name are taken from the packaging rather than a live system,
so confirmation would be welcome.


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname email@example.com?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

sos has plugins for postfix, sendmail and dovecot, but nothing
for exim, and no other plugin references it. Exim is the
default MTA on Debian and Ubuntu and is also packaged for
Fedora and EPEL, so an sosreport from one of those hosts
currently contains no mail configuration, queue state or logs.

The layout differs enough between distributions to need
subclasses: Red Hat ships a single /etc/exim/exim.conf with
logs named main.log, reject.log and panic.log under
/var/log/exim, while Debian uses the split configuration under
/etc/exim4 with mainlog, rejectlog and paniclog under
/var/log/exim4, and the exim4 unit name.

Common to both, the plugin runs "exim -bV" for the build and
configuration summary and "exim -bp" for the queue.

The passwd and passwd.client maps hold SMTP authentication
credentials in cleartext, including those used to relay through
a smarthost. Both are added to the forbidden paths in each
subclass so they cannot be collected under any option
combination.

Signed-off-by: Suraj Patil <surajpatil522@gmail.com>
@packit-as-a-service

Copy link
Copy Markdown

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo dnf install -y 'dnf*-command(copr)'
  • dnf copr enable packit/sosreport-sos-4422
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@arif-ali

Copy link
Copy Markdown
Member

again, please test the plugin before hand, we want to ensure that no secrets are coming out of config files or anything like that

@bmr-cymru

Copy link
Copy Markdown
Member

Unfortunately I can't meaningfully test this as I haven't touched exim since it was dropped as the default MTA for RHEL (around RHEL5 era—if you poke around in the legacy sysreport history you can see we had support for it, but no sos plugin was ever created).

'/etc/exim/passwd.client',
])

self.add_copy_spec('/etc/exim')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't be there (or in equivalent Debian file) some secret to obfuscate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants