`tools/audit` script idea: upload system info for troubleshooting

Since Mail-in-a-Box is targeted at general users, most are going to have no clue where to begin troubleshooting when they come here asking for help. Instead of going back-and-forth trying to get one piece of info at a time, what if we asked them to run a single script that uploads all the pertinent config files etc. to the internet?

Think something like Ubuntu’s Boot-Info tool, but for troubleshooting email.

It would be complementary to the whats_next.py script. That script guides users with a box in a known state, whereas the tools/audit script would be for helping users with a box in an unhandled, broken state.

My first concern with the script is that it needs to anonymize any obviously sensitive content:

  • IPs
  • Email Addresses
  • Hostnames
  • Usernames

Apart from that, we’d have to decide what information would be useful to include in the audit. I’m thinking:

  • Config files for basically any component in the System Architecture diagram
  • Postfix queue
  • IP configuration
  • Firewall configuration
  • Recent log files

What else?

A test suite (one has been started in tests/) would also help diagnose the problem. We should add into that tests for whether the services are running (like opening a connection to Dovecot’s LMTP service to check that it’s there).

I hadn’t checked out tests/ before. It’s a really good idea. With enough work, a test suite could automatically bisect the problem space and identify the source of almost any issue.