Rewriting incorrectly-formatted e-mail Date headers in Exim

August 3rd, 2025

I came across a device that sends automated mails via Exim, and that device’s developers (Axis) made it such that when certain mails are sent, it creates Date headers in a completely invalid format (apparently they invented their own format, instead of reading the standard in RFC5322). The incorrect format looks like this:

Date: Sun Aug 3 06:00:00 2025 +0200

rather than something like the following, which would be standards-compliant:

Date: Sun, 3 Aug 2025 06:00:00 +0200

This causes incorrect sorting in some mail clients (notably in Thunderbird mobile) but unfortunately, the device is sufficiently old that this is not likely to get fixed, so I decided to fix it at the server level on the Exim server, through which mails are sent. I added the below to the DATA ACL used for mail submission, and it seems to do the trick:

warn log_message = Rewriting incorrect Date header
condition = ${if match{$h_Date:}{^\w{3} \w{3}}}
remove_header = Date
add_header = Date: $tod_full

(We can probably all agree that, if the mail standard was being written from scratch again today, that neither of the above date formats would be chosen as the ideal one to be standardised…)

Cleaning up slide themes in Google Slides

August 26th, 2023

You know the scenario: a slide deck is using an old theme. Or, more likely, it’s made up of multiple themes due to repeated copying-and-pasting from different decks of different provenances.

These days, cleaning up a mess of multiple old themes to make a consistent deck in Google Slides is a lot easier than it used to be, and often fairly quick, but I keep forgetting how to do it, so this is a reminder-to-self.

In the below, “Slide Deck A” is the slide deck being built, that you want to look nice and consistent. “Template Slide Deck” is a clean slide deck containing the theme you want to apply (consistently) to Slide Deck A.

  1. Ensure that Template Slide Deck has at least one slide. Select it, and take it into the copy buffer (Ctrl-C or equivalent)
  2. Paste the slide into Slide Deck A, selecting “Keep Original Styles” in the import process. This should pull in the entire theme from Template Slide Deck.
  3. (Optional) You don’t need Template Slide Deck any more now, so you can delete it if desired.
  4. Back in Slide Deck A, if not already open, click “Theme” in the top nav bar so that you get a right-hand panel with themes in.
  5. Select some/all slides in Slide Deck A, right-click and choose “Change Theme”
  6. In the Themes panel, click “In this presentation” to expand the choice of themes. In there, you should find the “imported” theme from Template Slide Deck. Select it.
  7. Now the slides you selected should have the “clean” theme, and their original layouts will have been added to the clean theme. However, you’ll probably want to apply a layout from the “clean” template. Right click on the requisite slides -> Apply Layout -> choose one.
  8. Clean up the individual slide contents as necessary
  9. If necessary you can remove the “old” theme (it sometimes seems to automatically clean up once no more slides use it)
  10. Once you’ve migrated all the slides to a “new” layout from the clean template, remove the old layouts which were imported to the new theme (via Theme Builder)