Jim's Depository

this code is not yet written

Let's say your desktop machine has been sitting in place for 7 years without moving. Apple refuses to let your machine know its location without Wifi active. But you are using your glorious ethernet connection and don't want the chaos of a secondary connection that will sometimes get used and throw everything into a tizzy.

It is possible to work around this. Your Wifi radio has to be on and watching beacons, but it doesn't have to be connected to a network. Go through any network you know how to join and turn off "Auto join". Cycle your wifi off and back on. If you connect to a network, go set that one to not "Auto join" as well.

Once you have no networks to auto join your Wifi rainbow in the menu bar will be grayed, but your location services still work because the radio is looking at beacon messages from the nearby access points.

Maybe someday Apple will give us "On/Off/Location Only" for our Wifi state, but until then, this works. You just have to manually ask to join your network when lightning strikes your ethernet switch.

While testing SMTP message reception and DKIM validation I ran into an evil action from Postfix.

In my basically default Debian Postfix/Dovecot system, if you send a message to Postfix, it DKIM signs it, then sends it off to the destination. But if your message needed 8BITMIME and your destination doesn't support that, then Postfix quietly re-encodes your message and body to be quoted-printable.

Now your DKIM signature is invalid!

It sounds like you can configure Postfix to bounce that instead, but that's not what I got for a simple installation.

That was about a day and a half of me debugging my DKIM verification code because my body hash calculation kept not matching the one in the DKIM header.

Morals:

  • Just go ahead and support 8BITMIME and SMTPUTF8 if you can. No need to poke the bear.
  • If your body header checksum matches for some messages, but not others, its probably something upstream corrupting the message bodies after the signature.
more articles