Configuring an Ubuntu Linux server to route outbound emails through Gmail SMTP Relay using Postfix

Here’s another one to file under “For My Own Future Reference,” even though I’m phasing out directly managing clients’ VPS hosting. (What a pain that has become in the 2020s!)

I manage a few web servers, and handling SMTP locally with Postfix is no longer viable thanks to the ridiculous lengths receiving mail servers now have to go to in filtering the nonstop firehose barrage of spam.

Most of the time these are WordPress sites, so I have the client use a plugin like Gravity SMTP to route their mail through their chosen mail hosting provider (typically Microsoft 365 or Google Workspace, more affectionately known as Outlook and Gmail, respectively).

But I have a couple of staging/testing servers where I’ve just given up on having outbound email at all. Except that can still be a pain sometimes, like when clients lose their passwords. (How do people lose their passwords so much? Why haven’t we solved this yet in 2026? And don’t even say “two-factor authentication” or “passkeys.”)

I’ve finally gotten fed up with this situation, and I happen to have a bit of spare time this week to tidy up some of the loose ends that have been annoying me all year, so I decided I needed to find a way to do Gmail SMTP Relay at the OS level on these servers.

Fortunately, I found an excellent tutorial on the matter, so (at the risk of link rot) I won’t bother repeating all of that here. Even though my servers are running Ubuntu 26.04, the tutorial still works.

Except, not quite. After I followed the steps, relay was working perfectly when I sent messages to other domains, but it was failing on emails sent to my own domain. tl;dr The server was still trying to handle those messages locally.

I realized the problem was that the mydestination parameter in the /etc/postfix/main.cf file included my domain. There may be other, better, solutions to this problem, but in my case the simplest thing to do was to edit that line so the only value it contains is localhost. I did that, restarted Postfix, and… it works!

Sentence case vs. title case in website UI

Here’s something you may not notice, but I do: sentence case vs. title case for UI (User Interface) elements.

I know I’m old school, but in all of my upbringing using computers, and all of the websites I built or helped build, interface elements were always written in title case.

But I have noticed over the past couple of years that many (most?) websites seem to be moving to sentence case for things like navigation menus and buttons. It just looks “wrong” to me… but is it? I finally bothered to look into the topic:

https://typenorm.com/articles/sentence-case-vs-title-case-in-ui

I guess, just like refusing to write code with spaces inside parentheses, I’m the one who’s “wrong.”

The one thing that’s kind of ironic here is that I — mostly — switched to using sentence case for my blog post titles several years ago. (I’m a bit inconsistent with it because I kind of just go by what feels right on a given post.)

My rationale for sentence case in the blog titles was that they’re more like newspaper headlines — which have been written in sentence case for as long as I can remember.

But UI button labels? Those just feel like they’re supposed to be title case. Sentence case looks weird to me. Still, I feel like maybe this is something I just need to train myself to go along with. (But spaces inside parens in code? Never!)

How to conserve Apple Watch battery when running a marathon

Yesterday I ran my third marathon, and finally came in under five hours! It was a pretty big deal for me and I paid for the effort with incapacitating leg cramps.

I may have more to say about the run later. (Probably not nearly as much as I did after my first marathon though.) But right now I want to talk about the Apple Watch.1

Since phones got huge, I don’t like running with them. I have cellular on my Apple Watch, so my family can find me and we can communicate without me having to bring my phone with me. The only problem is, workouts drain the watch battery faster, and having a workout running for 5 hours can really run it down.

The last marathon I did, my Apple Watch made it to the end, but died almost immediately after it was over. My wife was running the marathon too, and we needed a way to find each other when we were done, since we run at different paces.

I did a bit of research yesterday to try to avoid having this happen again, and I ended up making three changes to my settings that helped immensely.

First, and this one is probably obvious, I turned on Low Power Mode. I was worried this might mess up the workout, but it seemed fine. My distance was pretty far off, but I don’t think that was due to Low Power Mode.2 The only thing I definitely noticed that was different was that it didn’t show the hundredths of seconds on the timer, which I always think is a bit silly anyway. Worth noting: Apple devices don’t like to stay in Low Power Mode when the battery is over 20%, so when you’re turning it on, you’re given the option of how long it should stay in Low Power Mode. I chose “1 day.” It worked.

Second, and this is also something that was fairly obvious, I turned off the Always-on Display. That’s really not something I ever need, but especially while in the middle of a workout. The screen is one of the biggest power draws on any device, and even though this feature is optimized to use as little battery as possible, it still uses more power than just having the screen go dark when you’re not looking at it.

Third, something I really hadn’t thought about at all, I turned off Background App Refresh. I have absolutely no need for apps to be retrieving data while I’m running. I don’t want email and text alerts in the middle of a run, especially not when it’s an organized race. And when you don’t have your phone with you, the watch itself needs to connect to the cellular network to retrieve the data, so I imagine it’s an even bigger battery drain.

I’m pleased to say, these three steps made a huge difference. When I finished the marathon, I checked my battery level, and it was still at 40%!

One last thing to consider: to maximize the benefit of these changes, don’t wait until just before the race. I switched all of these settings right when I took the watch off the charger in the morning, when it was still at 100%. I should probably also mention, I turned on Low Power Mode on the watch itself, but I made the other changes in the Watch app on my iPhone. I assume you can also change those settings directly on the watch, but I didn’t try it.


  1. As a point of reference, I have an Apple Watch Series 9. The latest model as I write this is the Series 12. ↩︎
  2. It said I ran 26.7 miles, a half mile longer than the actual distance. I know weaving around on the course ends up adding distance, but not that much. But I’ve been having calibration issues ever since I upgraded to watchOS 27 a few weeks ago, because I haven’t carried my phone with me on a run, which — for some reason — it needs you to do to properly calibrate. I’m not sure why an OS update would require recalibration anyway. ↩︎

John Ternus is the CEO of Apple, and Lake Ontario is still Lake Ontario

I present two screenshots I just took a few minutes ago, on September 1, 2026.

The first image is from Apple’s website. As of today, John Ternus is the new CEO of Apple, taking over from Tim Cook, who led the company since Steve Jobs’ death in 2011.

The second, of course, is from the Apple Maps app, correctly identifying the… uh… least great of the Great Lakes by the name it has had since long before either Canada or the United States existed as countries: Lake Ontario.

Now, of course, if you were to look at that same lake today on Google Maps, it would be incorrectly labeled as “Lake America” because… well, you know why.

I’ve been a map geek since I was a kid. Since before I had ever heard the name of the guy who decided Lake Ontario needed to be renamed. If you had told me that someday “She Makes Henry Eat Onions” would need to be changed to “She Makes Henry Eat Apples,” I’d have said “That’s about as likely as my very educated mother serving us something other than nine pizzas.” Well, times change. Still, the bar for renaming an international body of water should be even higher than the one for demoting a planet. (There are good reasons for renaming things, but a temper tantrum isn’t one of them.)

The timing of the decree that this change should occur was telling, because a similar decree was issued last year, and Apple fell in line almost as quickly as Google did. But not this time. What’s different?

This time, it was just days before Apple’s change of the guard. And just like how you “can’t” appoint a new Supreme Court justice in an election year (except when you can), I guess you can’t rename a Great Lake right before a new CEO takes over.

Where am I going with all of this?

For the past year and a half, let’s just say, Apple has handled certain situations in certain ways. And now they seem to be handling them differently. John Ternus is not Tim Cook. And John Ternus’s Apple is not Tim Cook’s Apple.

This seems like a rather absurd detail to dwell on, but I don’t think it’s an accident or a coincidence. Watch this space. (“This space” being Apple Maps.) Whether or not that lake gets renamed there will tell you a lot, I think, about how John Ternus thinks.


Postscript: I don’t really believe in synchronicity (nor do I believe my devices are surveilling me 24/7). But I also don’t think about planetary mnemonics, like… ever. The last time any phrase starting with “my very educated mother” crossed my mind was probably the same day I learned the term “dwarf planet.”

And yet, here’s something funny that just happened. I referenced that mnemonic in this blog post, and then, less than an hour later, as I have been working my way through the New York Times Connections archive, I happened to play the puzzle from April 23. I immediately spotted the most unlikely grouping of words.


Update, a few hours later: Oh well.

Screenshot

Gravity Forms: the selector you need to override default CSS variable values

I’m a big Gravity Forms fan. It’s the WordPress form plugin I recommend to all my clients.

Recent versions use a new theming engine for styles, with a default theme called Orbital. I do like the fact that it offers a lot of style customizations in the Block Editor. The only problem is, you can’t save your own default preferences for these settings. You can copy your styles from one block and paste them onto another, but that’s a pretty weak substitute for just setting your defaults that you want all of your forms to use automatically.

The Gravity Forms documentation doesn’t really acknowledge this seemingly obvious need. But I did manage to find a thread in their support forums that gets right at it. There are just two problems: a) the given answer is not quite right, and b) the forums automatically lock threads after 24 hours.

As far as that second issue goes, I kind of get it; I know how much forums can be magnets for spammers. But it seems easy enough for a paid plugin to restrict forum posting access to paying customers, which should pretty much eliminate that issue.

Of course, the only reason I even cared about that is that I have a correction to address the first problem, but I can’t post it as a reply on the thread, because of the second. So I’m posting it here instead.

The problem with the answer in the forum is that it assumes the CSS code is in the body tag, but it’s not. So, here I present, the correct (well, a correct) selector for applying your own overrides to the CSS variables in the Orbital theme:

html:has(#gravity_forms_theme_framework-css)
.gform-theme--framework.gform-theme--orbital


(That’s supposed to have a space in it, not a line break, but it’s too long to fit on one line in my current site theme, and a line break is fine in CSS code formatting anyway.)

The change I made was to replace body with html at the beginning of the selector.

I’ve confirmed this works, with my main goal of overriding the default blue “accent” color with one of the colors from my client’s customized Astra theme, like this:

html:has(#gravity_forms_theme_framework-css)
.gform-theme--framework.gform-theme--orbital {
	--gf-color-primary: var(--ast-global-color-2);
}


I don’t consider this a complete answer though, because a) it doesn’t change the accent color in the Block Editor sidebar, and b) that technically doesn’t matter, because when you use this CSS, the accent color in the sidebar gets ignored anyway.

Still, the goal here is mainly to impose my consistent theme style on the forms, so I’m not so concerned with the user being unable to customize the appearance. In fact, I don’t want them to be able to customize the appearance.

Ultimately, there are two features I want Gravity Forms to add, so I’ll shout them into the void here and try to will them into existence.

First, I’d like a global configuration page for the parameters of the Orbital theme, and/or for all of the default CSS variables.

Second, I’d like the ability to turn off the style tools in the Block Editor.