Some Bits: Nelson's log

15 posts about email

Outgoing SMTP relay services

Fiddlesticks. I had my somebits.com email all set up right. DKIM and SPF were working, I had a DMARC policy of rejecting unsigned email for three weeks with no problems. And then I broke my setup by cancelling Google Workspace.

Now I’m back but sending email via SMTP2Go. Details below.

I broke it

Last year I set up somebits.com to be on Google Workspace for incoming and outgoing email. And then promptly forgot what I did. Last month I stopped using somebits.com for incoming email because it was not working right. Cloudflare’s email relaying seemed better. So I figured I could stop paying $8/mo for Google Workspace since I wasn’t receiving email.

I forgot about sending email. Without Workspace, there’s no way to DKIM sign outgoing emails I send through Gmail. Gmail will still send email from @somebits.com but it won’t even try to sign them. That’s sort of OK, at least once I turned off my p=reject DMARC policy. But I like the idea of DKIM signed emails.

The easy thing would have been to re-enable Google Workspace. But when you do that you get a notice about how things might not work right for 24 hours. Google’s stupid eventual consistency designs still biting me in the ass, 20 years later. Also I just don’t like Google Workspace, it’s a messy product and does way more than I want. Time for an alternative SMTP sender.

SMTP relay services

The trick is finding a reliable sending service that caters to small legitimate users. Clearly all the business is in helping spammers marketers deliver bulk email. Not me!

I asked several AIs what I should use. My main concerns are correctness of DKIM and SPF and a good reputation so I don’t get blocked along with a bunch of spam customers. Here’s a quick summary of what the AIs suggested:

  • SMTP2Go. Generous free tier of 1000 emails / month, supposedly forever. Good reputation, good service.
  • Brevo. Very generous free tier (9000 emails / month). But some question about reputation.
  • Postmark. The leader for correct + good reputation, in part because they segregate marketing email. But the free tier is only 100 messages a month. If I get to the point of needing to pay $15/mo to deliver email I’ll look at them again.
  • Forward Email. They came up as a relay for receiving mail too. The free tier doesn’t allow sending mail via the relay so I didn’t look further. OTOH $3/mo may cover me, worth a look again maybe.
  • MailerSend. Generous free tier (3000 emails/month). Didn’t look further.
  • Amazon SES. Not interested in the mire of AWS.
  • SendGrid / Twilio. Nah.
  • Mailgun. Seemed good but no real free plan.

I wanted to use Cloudflare since I already use them for receiving email. They did finally launch their email sending service in public beta. But near as I can tell they don’t have an SMTP relay suitable for pointing Gmail at to deliver mail. It’s not really their goal, the purpose of their service is more backend stuff.

Sorry for the half-ass evaluation, I was losing patience. I picked SMTP2Go based on what I saw.

SMTP2Go

So far so good with SMTP2Go. It’s pretty simple. You set up an account, tell them what domain you want to send mail as, then they give you three DNS records and you’re off to the races. One neat trick is the DNS records are all CNAMEs to their servers, no need to configure complex TXT records with nonces in them.

I like their dashboard UI. You can set up different users, manage passwords, etc. It’s all overkill for my small use case but easy enough to work with. I appreciate the rapid view into sent email with logs and reporting and the like.

One weird thing: smtp2go explicitly says you don’t need to set up an SPF record. Instead they are using something called VERP that involves a CNAME, see here for more detail. One of the test tools I tried complained about an SPF failure so I went ahead and added smtp2go as an authorized sender for my whole domain, which shut up that error.

Email receivers for testing

I keep tinkering with my email setup. It’s very helpful to have an email address you can send messages to that gets you some diagnostics. Here’s a few.

Technical tools

dmarctester aka learndmarc. A very cute interactive tool. A little cumbersome for quick testing but there’s a fast forward button. It shows results for SPF, DKIM, and DMARC. It does not show spam score nor the exact message it received.

dkimvalidator: very barebones but good for basics of SPF, DKIM, DMARC. Shows original message front and center. A little hard to read but then again quite complete. I’ll note this flagged an SPF error where others didn’t. I suspect this isn’t supporting the VERP that SMTP2Go uses or if there’s a real problem. (The problem went away when I added a supposedly unnecessary SPF entry.)

mxtoolbox has a responder on ping@tools.mxtoolbox.com. The email reply gives you basics (SPF, DKIM, DMARC) and you can click through for a nicely formatted detailed report. Not much marketing / reputation info. Does show you the exact message received.

Marketing tools

mail-tester.com. Nice mix of technical stuff (SPF/DKIM/DMARC) and content / marketing stuff. Shows your spamassassin score. Tells you if you’re on any major blocklists. Will show you original message. I like the way this tool looks.

aboutmy.email. Marketing-oriented tool. Does tell you about SPF and DKIM, also Yahoo/Google requirements (like an unsubscribe link)

Not useful

check-auth@verifier.port25.com: this tool was great but recently stopped working (April 2026).

DMARC p=reject

I’m further working to secure my new somebits.com email domain. Today I’m setting a strict p=reject policy for DMARC. If a message arrives claiming to be from @somebits.com and isn’t DKIM signed, the receiver should bounce it. Scary!

Why do this? Because I think all email I’m sending will be DKIM signed, so it’s harmless to my legitimate mail. And it will stop spammers from spoofing mail from my domain. I’m hoping this will also be seen as a positive sign that my domain is not a spam source. Or at least, prevent my domain from getting a bad reputation from people spoofing it. Let’s see.

Details

DMARC and DKIM have been around for awhile but almost no one enforces it strictly. If an email should be DKIM signed but isn’t, email receivers like Gmail will take that as a signal that maybe it’s spam. But they aren’t strict about it.

You can set a DMARC policy for a domain about what to do for unsigned email. A lot of folks run p=none, which means “don’t worry about the signature but send a report if it doesn’t match”. A monitoring setup, you can send error reports to nice consoles like PostMark’s or Cloudflare’s.

I’ve been doing that for a few weeks now and all my emails seem to be properly signed. They should be, I only ever send mail out from Gmail. I have seen some reports of failed signatures but they all look like spammers impersonating me. Today it was an email from China Mobile to mail.ru. Definitely not me.

A lot of folks advise testing the waters by setting p=quarantine first. That tells the receiver to just put the mail in a spam folder, not bounce it. But that means I get no feedback. My theory of jumping straight to p=reject is if anything goes wrong my mail will bounce and I’ll see it. At least, I hope so.

What might go wrong? The usual problem is a bunch of legacy systems are built around spoofing email. Various cron jobs, mailing list software, etc impersonating @somebits.com. But I haven’t done that for years because it’s unreliable. I send all my mail via Gmail’s servers where they are DKIM signed. So I should be good.

Another way to test is pct=25 or the like, to say “only reject 25% of the mail if it’s not DKIM signed”. I can see the value of this for a high volume domain so you don’t break all your customers. But for a personal domain it would just make things unreliable. I either want it 100% working or 100% failing, not for a quarter of my mail to randomly get dropped.

So now we run this way for a few weeks and see what happens. I’m liking Cloudflare’s DMARC reports, they are aggregated daily and presented in a nice dashboard.

Subdomains

Currently I have no setting for the subdomain policy sp=. The default behavior is to follow the p= policy, so now I have sp=reject as well. That means any email for subdomains like foobar.somebits.com will act the same as somebits.com. Which is just fine for my situation, I’m not even using subdomains.

SPF

BTW, all this DMARC and DKIM stuff is different from SPF. DKIM says “this email claiming to be from @somebits.com was signed by a valid somebits.com system”. There’s also SPF, which says “this email for @somebits.com arrived from an IP address belonging to a valid somebits.com system. I do have some SPF failures because various folks are legitimately forwarding email around who aren’t valid SPF senders for my domain. I had this problem for my inbound email and fixed it by using Cloudflare as my MX. They do ARC signatures right which works around the SPF problem.

It’s possible to set aspf=s to tell mail systems to strictly drop any email for the domain if there’s an SPF failure. I can’t imagine that works well in practice. I’m not doing it.

Bottom line: Cloudflare still reports SPF failures but it’s OK. They are often from legitimate activity. And systems are supposed to not drop my mail just because of an SPF failure.

Testing

Gemini helped me test what happens with email that’s not signed. It’s gotten a little tricky to forge email: all the legitimate mailing services don’t allow you!

LearnDMarc is a tool that will forge mail and show you what happens. It’s a little too scripted though, I’m not sure if what I was seeing is real.

swaks is a modern tool for forging mail, a replacement for the old days of just telnetting to port 25. That’s hard to run from a home ISP because they all filter outgoing port 25, but I have a cloud server that still can send email. So I tried sending an email to gmail from me at somebits.com:

 -> Date: Tue, 31 Mar 2026 19:13:45 +0000
 -> To: ******@gmail.com
 -> From: *****@somebits.com
 -> Subject: test Tue, 31 Mar 2026 19:13:45 +0000
 -> Message-Id: <20260331191345.1520151@localhost>
 -> X-Mailer: swaks v20240103.0 jetmore.org/john/code/swaks/
 ->
 -> This should be rejected by DMARC.
 ->
 ->
 -> .
<** 550-5.7.26 Unauthenticated email from somebits.com is not accepted due to
<** 550-5.7.26 domain's DMARC policy. Please contact the administrator of
<** 550-5.7.26 somebits.com domain if this was a legitimate mail. To learn about
<** 550-5.7.26 the DMARC initiative, go to
<** 550 5.7.26  https://support.google.com/mail/?p=DmarcRejection 46e09a7af769-7da0a433fadsi8755951a34.58 - gsmtp
 -> QUIT

Looks like it worked! An immediate rejection from Gmail’s receiving SMTP server. Great!

Email woes again, CloudFlare setup

A few months ago I gave up using monkey.org for my email and moved my email setup to my personal domain somebits.com. I was using Google Workspace as the MX entry for receiving mail for that domain; as of today I’m using CloudFlare. So far so good.

Google Workspace problems

The setup I was using was to pay for Google Workspace and have them receive all mail for my domain via an MX entry. Google Workspace was then told to forward all of it to my personal @gmail.com account. This worked pretty well but every once in awhile friends @yahoo.com or @hotmail.com would complain that a message bounced.

The problem turns out to be the way Google Workspace forwards email to Gmail. They don’t do it right! I’m not confident but I think they’re not doing SRS or ARC correctly. So Gmail receives this mail claiming to be from some random @yahoo.com person and to me@gmail.com, but the mail isn’t correctly signed and so Gmail rejects it as spam. It didn’t happen often, not as often as my old monkey.org setup, but it happened enough to annoy me. Google should be able to forward mail to itself reliably!

It’s possible I could have fixed this by not using Google Workspace to forward the whole domain and instead just to forward individually from my name @somebits.com to my personal Gmail. Some reports suggest ARC/SRS works better in this configuration. I didn’t try it.

CloudFlare Email

Instead I followed an AI’s advice and have switched to using CloudFlare as my MX provider, a feature they call “Email Routing”. (The other option was forwardemail.net). It’s simple but seems good. The free tier is all I need. You can have CloudFlare forward email to specific names @ your domain to specific destination email addresses. There’s also a Catch All forwarding option that’s off by default.

The key thing is CloudFlare seems to be doing ARC and SRS stuff correctly. Email I send to myself from yahoo mail arrives fully intact and properly signed as far as Gmail is concerned. Yay!

As part of this change I also made CloudFlare the nameserver of record for my domain instead of Porkbun. I’m not sure that’s 100% necessary but it makes things easier on CloudFlare. Also they are the best in the business at providing DNS so why not?

One gotcha: CloudFlare email routing doesn’t support subdomains, at least not easily. I wanted to test all this just for test.somebits.com at first but it was either all of somebits.com or nothing.

Another gotcha: CloudFlare rewrites the SPF record for your domain saying only CloudFlare is authorized to deliver email for your domain. This isn’t a total disaster, it’s a soft fail, but it means that Gmail can’t sign mail it sends for you. The solution is to hand edit the SPF record to include both Gmail and Cloudflare as authorized senders. The test address auth-results@verifier.port25.com was a big help in figuring this problem out.

(It’s a bit weird that CloudFlare injects itself in the SPF records because CloudFlare doesn’t yet offer a service that delivers email for you. Ie, no outgoing SMTP. You have to send your mail out via Gmail or someone else. The AI says that ClouldFlare still needs an SPF record so that the mail forwarding is allowed and properly signed. Anyway a hybrid SPF record seems to work fine.)

Update: Cloudflare is better

Cloudflare’s email forwarding is better. All my forwarded email used to show up in my Gmail with failing SPF. Now it shows as passing. I can no longer understand email headers, particularly all the signature stuff, but apparently the difference is Cloudflare is doing the Sender Rewriting Scheme (SRS) whereas Google Workspace does not. According to Gemini the crucial difference is the Return-Path header, which reflects the data sent on the MAIL FROM part of the SMTP exchange:

FeatureEmail 1 (Failed SPF)Email 2 (Passed SPF)
Return-Pathsomeone@hotmail.comSRS0=tzui=rb=hotmail.com=someone@somebits.com
SPF CheckChecked against hotmail.comChecked against somebits.com
ResultFail (Google isn’t a Hotmail server)Pass (Cloudflare is allowed for somebits.com)

I don’t really understand all this stuff. But Workspace seems to be just forging mail when it forwards it to Gmail, pretending to be sending on behalf of hotmail.com. Cloudflare is being more honest that the email is really from my domain somebits.com but still mentions the hotmail addresses. The actual From header is hotmail in either case, that’s the one I most care about since it’s what is displayed.

I still think Gmail should have special rules for accepting email from Google Workspace. But I can see why they don’t, both for technical reasons and for anti-trust reasons. Failing that, why isn’t Workspace doing SRS?

New email setup

Email is the most important Internet service I use. I’ve been using something like email since the mid-80s on BBSes. I had my first networked email in 1988, a very rickety UUCP setup to a local BBS. 1989 at college got me real email, first uunet!ogicse!reed!minar, then minar@reed.bitnet, and finally nelson@reed.edu and proper SMTP. I moved on to santafe.edu and then media.mit.edu along with monkey.org which was my personal email home for nearly 30 years.

Names

This week I’ve moved on from monkey.org. I’m now using somebits.com as my primary email domain. I’ve owned that domain for 20 or 25 years now but have only used it for my web stuff. Now it’s my email address, hopefully for the rest of my life.

I’m not in a hurry to change my email address everywhere. I’m still not fully trusting the somebits.com setup but it seems reliable so far! But it’s an enormous task to change every single Internet account over to a new login email. I’ll be receiving mail at monkey.org and gmail.com for yeas.

SMTP services

Currently I’m hosting somebits.com email on Google Workspace via the usual MX setup. They do a good job of accepting mail for my preferred mail user agent. They also do a good job of delivering email for me. All the DKIM and other antis-apm stuff a modern domain needs works fine on Google Workspace. And the company has a good reputation, so most sites will accept their mail.

Before this switch my monkey.org address was being handled by hostedemail.com, a TUCOWS service. It worked OK for many years but not perfectly. Some of my mail got bounced for not being properly DKIM signed, and some mail never got delivered. Part of my problems were I was just having hostedemail forward to Gmail and that was not 100% reliable.

Mail User Agent

I’ve used Gmail since 2004, when it launched. Before then I used Thunderbird on a self hosted SMTP and IMAP setup. And before then various Unix local mail delivery systems with an emacs mail reader, Berkeley mail, etc. I’m still using Gmail today as my primary email archive and all my mail is sent to or through it.

But this week I switched to Shortwave as a frontend to Gmail. It uses Gmail as the archive and mail services but has its own web app. The webapp is pretty Gmail-like but nicer in lots of little ways. And it’s married to a very good LLM and RAG system so I can do natural language queries about my email like “when is the potluck today?” or “what recipes did I share with my friend Jack?” I’ve written a bit about it already and have more to say. It’s very good but not perfect.

Future changes

This is enough change for awhile! But I still have a couple of other things I’d like to do.

I have old email archives in mbox format going back to 1990 or so. I never did get around to importing them into Gmail and would like to. Now that Shortwave can do a good job talking about those mails maybe it’s finally time.

I’d still like to write my own email search system. Shortwave is a good product, I don’t need to. But I think I could learn something tinkering with my own RAG system. Also maybe do some specialist things Shortwave doesn’t do, like analytics.

Shortwave AI email

I decided to give Shortwave a try. It’s a better email client with significant AI features. I mostly want it for better LLM-powered search of my old email, something Google cannot do. So far I’m impressed. Only drawback is its expensive for a consumer product: starts at $288 a year, I’m paying for the $432 a year version. There is a free trial.

First impression is very good. It works fine as a Gmail replacement, with two-way sync to Google data that seems to work.

The onboarding is a bit slow. Recent email works immediately. It’s pulling in archives. After four hours it has indexed some mail but I can’t tell how much, there’s a progress bar showing 10%. I do have 12GB of email over 21 years, I can imagine it takes awhile. They don’t have a way to just upload a Google Takeout dump.

My first AI query went very well. I sent a bunch of emails today about hosting a party. It read them all and summarized them usefully. There was more below this post, details of RSVPs from specific people in a very nice summary. This is the kind of magic I am expecting in an LLM with my email.

Asking it for “what is my oldest email” didn’t go as well. I have email back to April 2004. It didn’t find the older ones at all at first. Finally with a lot of prompting it found April 29, 2004. Then I had to ask more and it finally, finally got to the April 2, 2004 emails it should have found in the first place. Ie they’re there, but the AI retrieval didn’t work well. I’m wondering if “oldest” is just not something they optimized for.

Update: support replied quickly with an excellent reply that boils down to “oldest doesn’t work well”. They suggest giving explicit date ranges. That matches what I’ve observed.

Various other freeform queries show some remarkable comprehension of my emails. It’s not perfect, I feel some things are occasionally missing. And the whole system is a little too business-tuned whereas I’m often using this for personal correspondence. But overall it’s useful.

It also has features to write emails for you and promises to do that in my own style. I don’t really want this, it seems rude to have a robot write my email for me. But it is interesting as an editing tool.

Party details

Just for laughs, here’s what Gmail / Gemini offered me

This is the second wrong answer I got from Gemini. The first one earlier today was about a friend who is having a birthday the same day. It has nothing to do with my party at all. I did finally got a right answer when I prompted it “the party is saturday sep 13. I sent a lot of email about it today. can you find that”. This suggests the retrieval part of the pipeline is what failed here, not the summarization.

Gemini AI in Gmail is terrible

I keep musing over the idea of using an LLM to work with my 20+ years of email archives, currently in Gmail. I finally realized a couple of days ago Google has this product. It’s part of Google AI Pro, also sometimes called Google AI Premium and often labelled “Google Workspace” (where the AI was first deployed). It includes a Gemini-in-Gmail system. It’s not just the product naming that’s such a mess though: the Gemini-enhanced Gmail is just terrible.

The problem seems to be the retrieval part of the RAG that I imagine is powering this product. Gemini only seems able to see about 6 months of my email archives. Even with very specific queries like what’s the oldest email if you search for “steam purchase” in 2021? it doesn’t actually find that oldest email. Gmail keyword search works fine and finds about 10 or 15 emails. But then Gemini can’t find them.

I started using Gmail April 2, 2004, the day after it launched. If I ask it for the oldest email of all it can see it gives me something from mid 2025 and provides a subject line. If I ask for the oldest email from 2003 it hallucinates an email from April 17, 2003 with that same recent subject line. It’s just not useful.

I get that RAG is hard. I’m sure the Gmail team was asked to launch an AI feature very fast. But what they’ve deployed is terrible and should not have been released. The only excuse I can think of is if somehow this “show me the oldest” query is perversely hard for their system. Maybe it’s more useful on other types of queries? Not in my experience.

I’ll tell you what’s really annoying: all the extra UI popups offering AI help where none is wanted. Including summaries of emails which are distracting and sometimes wrong. It’s like Clippy but worse. Just terrible all around.

ChatGPT is doing way better. Too bad they don’t have the email product I want.

Update: another example, Gemini can’t even keep track of the context of “3 emails I sent”.
How many emails have I sent to this person today?
You have sent 3 emails (This is correct)
Can you summarize those three emails?
It looks like there are only two emails in this thread.
(Proceeds to summarize my mail and his reply, ignoring my other two sent emails.)

DMARC reports

I set up DMARC on my new domain with p=none; rua=mailto:dmarc-reports@example.com. This means “don’t enforce any mail restrictions, but send reports to this address”. Never seen a report before! I sent a few test emails recently and got my first set of reports.

Each of three mail handlers I sent mail to emailed me back a report for 24 hours. Some had no text at all, some had a summary of the contents (like “1 success 0 failures”). Attached in the mail is an XML report in some standardized format. It seems to contain stats aggregated by source_ip with info on what domain the mail claimed to be from and whether it delivered or not. You can also infer roughly where the mails or going from who is sending you reports, although “Gmail” could be any of a zillion people. Anyway overall it looked useful and not too privacy-invading. I imagine there are tools to ingest the XML and track stats. Update: a friend recommends Postmark which I think has a free level.

Every time I try to read more about all the modern spam measures in SMTP I find a bunch of sites catering to spammers. Er, “newsletters”, which I assume 95% of the time means marketing bullshit. It’s clear why they’re the audience with money to be worth writing docs for. But I can’t help the feeling something is wrong when we’ve built so much email infrastructure that is mostly used by and circumvented by the spam industry.

I find it hilarious that spamassassin has a rule that says “any mail signed with DKIM looks a little like spam”. That’s then offset by a bunch of DKIM specific rules that rate the mail less like spam if the signature is valid, matches SPF, etc. DKIM is a net positive in spamassassin. But not entirely!

<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
  <version>1.0</version>
  <report_metadata>
    <org_name>google.com</org_name>
    <email>noreply-dmarc-support@google.com</email>
    <extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info>
    <report_id>74417372361908878</report_id>
    <date_range>
      <begin>1756425600</begin>
      <end>1756511999</end>
    </date_range>
  </report_metadata>
  <policy_published>
    <domain>example.com</domain>
    <adkim>r</adkim>
    <aspf>r</aspf>
    <p>none</p>
    <sp>none</sp>
    <pct>100</pct>
    <np>none</np>
  </policy_published>
  <record>
    <row>
      <source_ip>209.85.220.41</source_ip>
      <count>1</count>
      <policy_evaluated>
        <disposition>none</disposition>
        <dkim>pass</dkim>
        <spf>pass</spf>
      </policy_evaluated>
    </row>
    <identifiers>
      <header_from>example.com</header_from>
    </identifiers>
    <auth_results>
      <dkim>
        <domain>example.com</domain>
        <result>pass</result>
        <selector>google</selector>
      </dkim>
      <spf>
        <domain>example.com</domain>
        <result>pass</result>
      </spf>
    </auth_results>
  </record>
</feedback>

New domain Google Workspace email setup

I’m setting up my domain somebits.com for my new email address. To do this I’m using Google Workspace to handle email. This turns out to be remarkably complex: Workspace is a quite elaborated product and designed to do a whole lot more than just forward email. I’m ignoring almost all of its features and only using it to forward all email sent to me at somebits.com on to my personal Gmail account (an @gmail.com address).

Receiving somebits.com email in personal account

There’s two ways to do this. You can forward email for an individual somebits.com simply in that user’s Gmail setup. Instead I’m using Workspace tools to forward mail for the whole domain, before it gets to the user’s Gmail. I’m doing a blanket default route (ie: all addresses in somebits.com). There’s way more complex routing rules.

This is the key configuration. In Admin / Apps / Gmail there’s an option for “Default routing”. Here you can tell it that for All Recipients, Change the envelope recipient to any email address you want. I used <my.address>@gmail.com. I also clicked “Bypass spam filter for this message” and “Perform this action on non-recognized and recognized addresses”. I believe this means every single email will go to my personal gmail account.

Sending somebits.com email from personal account

I also want to be be able to send email from somebits.com from my personal @gmail.com. This is just adding another account in to Gmail. It wants to know an SMTP server: I tell it smtp.gmail.com. It also wants a username and password for logging in to the SMTP server. That’s kinda dumb: this is Gmail using Gmail! But they don’t have a special auth path. So I created an app password for it.

Email logs

Workspace has a very useful email log (“Email log search”) for figuring out problems. Note when you load it it says 0 results: you have to click the search button for it to populate.

DKIM and DMARC and SPF

I’ve set up DKIM (to sign mail), SPF (to say who can send mail for my domain), and DMARC (to say what folks should do with improperly signed mail). The Workspace docs for this are pretty good. check-auth@verifier.port25.com is also a big help in testing things. DKIM and SPF seem like basic price of entry now and the main reason I’m using Google Workspaces at all is I can have Gmail in the loop, Gmail is highly trusted globally. DMARC seems more optional, I’ve set up p=none just out of curiosity what reports I’ll get.

Account juggling

I now have two logins: my personal gmail and my new account. Every time I use any Google product I need to be careful which account I’m using. Most Google products have a switcher now. Gmail isn’t so bad. I got tripped up and accidentally turned on Workspace for my personal Gmail account because I didn’t realize which user I was clicking a button as.

Email woes

For nearly 30 years I’ve been using nelson@monkey.org as my email address. The hosting details have changed over time but for nearly twenty years I’ve been forwarding everything into Gmail. Over the years this has gotten worse and worse as email has deteriorated as a medium.

monkey.org uses OpenSRS’ HostedEmail for both sending and receiving email. It seems fine if barebones.

Sending email

The big problem I solved today was that Gmail was sending email itself and just forging the monkey.org address. This used to work seamlessly but over the years a variety of not-very-effective spam fighting technologies have made this harder and harder. The big problem is Gmail cannot sign emails for DKIM as monkey.org and DKIM is increasingly becoming required to have your mail delivered.

Today I got to learn all about SPF and DKIM and DMARC. The autoresponder at check-auth@verifier.port25.com is very helpful for diagnosing problems, there’s also a lot of web based email verifier tools online.

About a month ago Yahoo (and sbcglobal, and pacbell..) stopped accepting email from me. Often mail would just disappear but I did get one helpful bounce.

550 5.7.9 This mail has been blocked because the sender is unauthenticated. Yahoo requires all senders to authenticate with either SPF or DKIM. Authentication results: DKIM = FAILURE - SPF monkey.org with ip 209.85.167.173 = FAILURE. See https://senders.yahooinc.com/smtp-error-codes/#authentication-failures for more information.

This report is bogus: that IP address (from Google) is valid in monkey.org’s SPF records. At least it is right now. But there is no DKIM signature in my email and that’s maybe really why Yahoo bounced it. (monkey.org has a DMARC policy of p=none, which should mean sites accept email without DKIM).

The solution for all this is to configure Gmail to use monkey.org’s SMTP server to send mail so that server can DKIM sign the mail. I hate adding this extra server in the path but there’s really no way around it. It seems to work fine once I figured out the configuration.

Ugh: now a new problem, I can’t send a Google Photos URL to a hotmail friend of mine, it gets bounced as spam, I think by hotmail. This never happened before when Gmail was directly delivering the mail but now that hostedemail is involved, I get marked as spam.

Receiving mail

I’m also having trouble receiving mail.

In my old setup, monkey.org forwarded my email directly to gmail as soon as it was received, I think inside the mailer daemon itself. This forwarded started failing occasionally, silently bouncing mail back without a clear explanation. Not consistently: simple text email from the same sender would mostly get through then one out of ten would bounce. Lots of spam gets through no problem.

We changed it so monkey.org now delivers mail into the OpenSRS HostedEmail webapp. I then configured the app to forward mail to gmail. This mostly works fine, although it is yet more steps to process each message. But some messages still don’t get to gmail. Now instead of bouncing they get left in my Inbox at HostedEmail. It seems about the same pattern as the ones that bounced. My guess is Gmail doesn’t like these messages for some reason and is refusing to accept the forward. At least I can find them in this other inbox.

I may yet configure Gmail to also fetch mail out of HostedEmail via POP3. That may be a way to retrieve the messages when the forwarding fails.

Change my email address?

Part of what’s made this complicated is I don’t control monkey.org. The other folks who use monkey mostly do not use Gmail. No complaint, they have been very generous and reliable, but I’m basically relying on the help of old friends. So once again I consider whether I should change my email address, probably to the domain I use for my blog. I can set that up to be hosted by Gmail pretty easily for $7/month. I think all the configuration is pretty simple, a few DNS records to set up just once.

We are a long long way from the days when you could send email just by telnetting to port 25 and typing. And yet somehow we still don’t have end-to-end encrypted email. Probably never will.

Update: giving up

Sending mail via hostedemail is causing enough new problems that I’m giving up. I’m setting up my blog’s domain for email 100% in Google Apps. Email used to be an open medium. It has now been wrecked by spammers and captured by a few companies.

LLM-enhanced email archive

I had an idea for a project and posted to Mastodon

I want an LLM trained on my 20+ years of email archives. Needs to be private to me. Is it straightforward and not too expensive for me to set something like that up just for myself for occasional use?

Main use would be a query for specific things, “what did I say to this friend 10 years ago about music?” But also just for general knowledge. I think it’d mostly work as free text but there’s a little email-specific structure it’d be nice to capture.

I got an interesting variety of replies, ideas collected here.

I gather there’s at least three different methods that could apply. Most folks suggested #2, RAG.

  1. LoRA training, which alters the core LLM weights
  2. Retrieval Augmented Generation which augments LLMs with a document store it can select from and use to tune replies. Sort of a formal version of...
  3. using a big context window and preloading the query with stuff

I think 2 and 3 are in common use now for consumers. But 1 is still more specialist and requires you have your own LLM inference engine.

One recommendation I got was to use SillyTavern, a consumer LLM wrapper for role playing game players. It does RAG for you: you give it a bunch of documents and it manages LLMs for you and lets you talk to it. I bet it has a lot of the plumbing I need. This suggestion also reminds me there’s a world of porn AI enthusiasts too, all DIY with local models to work around censorship. They may have some interesting tech.

Mark Fletcher (who runs an email service) gave me a great reply about how he mixes RAG with ElasticSearch. Useful notes but pretty involved, would be a lot of work. I should give his feature a try though and see how well it functions.

Update: Justin Mason reminded me of his personal GMail archive project: he indexed 20 years of email from Google in a local system using notmuch. No LLM in this work but could be a useful related component for the email retrieval part.

I’m not interested enough in this to build a whole product, I was more wondering if I could just hack something up by throwing a wall of text at an LLM. I think RAG is the tool to do that, paired with ollama or deepseek.

The other question is where to run it. My email is very private, I don’t want to ship the archive off to some untrusted provider. “A big Mac at home” is one common suggestion. I’ve been thinking about leasing a cloud machine to use on demand. I think a PC at home with an nVidia 3xxx may be sufficient to at least prototype.

Update August 2025: it’s been a few months and some things exist.

Proxmox notifications: gotify, email

Proxmox sends emails for important notifications, there’s nice docs. But email sucks in 2024, I have no idea how to get mail like this delivered. The only other option Proxmox supports is Gotify. I wish it had some generic HTTP post or something simple, looks like the Proxmox devs are adding webhook endpoints. ntfy.sh seems popularly requested but can be supported in a webhook. See also apprise and UnifiedPush.

Gotify

Gotify is a little self-hosted server that receives notifications and does things with them. It has very nice docs. Gonna tinker by installing it in an LXC in Proxmox. This server should really be hosted elsewhere, ideally a cloud service, but those seem to start at $9/mo so let’s just hack in a container for now.

Installing was easy with the tteck script. I added tailscale and had to manually wangle the LXC config to allow access to the tunnel device, per usual. With that gotify’s web server was available. The default login is admin/admin.

AFAICT tteck doesn’t install any config script. There’s a systemd unit to start it and the software is in /opt/gotify. I think /etc/gotify/config.yml would be a reasonable place for a config. It actually seems OK with no config file? It must have reasonable defaults, like sqlite3.

Getting Gotify up and running with Proxmox isn’t too hard. You create an application, take the token, then set up a notification destination in Proxmox. I also told Proxmox’s notification matcher to deliver to gotify. Test messages post immediately and are visible in the webapp. The Android app works but I don’t like the design: I want something else connected to Gotify and just delivering push messages to my phone.

I could also use some other delivery options. Deliver to RSS in particular. There’s a bunch of plugins and contrib stuff. No Atom or RSS! There’s a Slack plugin but it’s 5 years old and doesn’t work with modern Slack tokens.

Lots of interesting plugins for receiving notifications too. A zillion RSS receivers. Support for webhooks, yay. Also an SMTP gateway. Also appreciate this reverse proxy so I could use a public IP instead of Tailscale.

I dunno, I’m left thinking the core Gotify message router is pretty good but usability and features are not. The default message view is very limited (no time filtering, doesn’t even show the application). The Android and other delivery options look limited. I’ll keep using Gotify for now because it’s all Proxmox supports but once PVE adds webhooks or something I should re-evaluate.

Email

The default configuration has you specify an Internet email address that root mail should be forwarded to. But they don’t do anything to actually help you get email delivered. The default config will gamely just try to SMTP deliver the mail but of course no modern mail system relays mail from strangers. The mail just disappears into a postfix queue until it times out.

How about local delivery? I first tried making root’s forwarding address root, the empty string, root@localhost, or other variants. None worked: either invalid or a mailer loop. I then fixed it by removing ~root/.forward. Now postfix will write to /var/mail/root. Not ideal but at least it’s not disappearing.

Another local option is to create a second user account on the PVE host (like “nelson”) and forward root’s mail to it. But I’m trying to avoid that.

Remote delivery should be possible, in the past at least it was possible to get Gmail to relay mail for you if you were authenticated enough. But every time I look at doing that it gets harder. Screw it.

Filtering MailChimp spam in Gmail

Trying a new thing: labelling all email from MailChimp in Gmail so I have a heads up it’s probably spam. I’m not quite ready to just stop seeing these mails but I’m getting there. Here’s the filter, thanks to JsKnox’ suggestion to filter on list:mcsv.net.

Matches: list:mcsv.net.
Do this: Apply label "mailchimp", Never mark it as important

I didn’t select the action “skip inbox”. That’d be the next step. (I find JsKnox’s suggestion to reply with email of your own amusing but way more than I’d do.)

I’m not convinced this filter is perfect. My old filtering on phrases in the mail like “view this email in your browser” catches more mailing lists. But they may not be Mailchimp mailing lists; some seem to be some other spam software. I may end up wanting to filter on those too but I’m going to focus on Mailchimp for now. That list:mcsv.net filter sure is easy.

Thoughts and Rant

I get a lot of spam from MailChimp, Intuit’s spam company. Four years have passed since I last looked at this; back then I concluded 93% of the mail MailChimp sent me was spam but the other 7% was useful enough I didn’t block them entirely.

It feels worse now. Nothing in the product has improved for me, they still have nothing for people who receive mail from MailChimp. We are the product, not the customer. Meanwhile Intuit has cemented their control over the spam market.

I didn’t bother categorizing all the recent Mailchimp mail I got. Some of it is stuff I want, local community organizations that use Mailchimp (because what else is there?). A lot of it isn’t. Holidays are worst, when every restaurant and hotel I ever foolishly gave my email address to eight years ago decides to sign me up for a new spam mailing list and suggests I pop in for Christmas dinner in Thailand or London or someplace else thousands of miles from me.

The key problem is how Mailchimp allows their customers to add people like me to new mailing lists without my consent. That should not be allowed. Every subscription to a list should require consent from the recipient. But that’s not how the business works.

Gmail is in an interesting position where they could make that how the business works. Just tune their spam filtering algorithm a tiny bit, maybe rank mail from new mailing lists where I didn’t opt-in via Gmail more like spam. That’d be absolutely crushing to Intuit’s business and would no doubt lead to lawsuits. Couldn’t happen to a nicer company.

How much Mailchimp is spam? What should they do?

A discussion on Twitter led me to wonder; is all the mail I get from Mailchimp spam? Can I filter it? Turns out filtering Mailchimp in Gmail is hard. But I have a mediocre solution and some ideas on what Mailchimp should do to be kinder to email recipients.

I only notice Mailchimp mail when I get some crap I don’t want to see and click the Unsubscribe link. I get a lot of these same spams from the same company, like my old college or my local pizza place. The landing page for unsubscribing is distinctly Mailchimp, which is when I notice that they’re the source of the spam.

What seems to happen is a Mailchimp customer creates a new Mailchimp list for every marketing campaign. So I won’t get any more June 5 Campaign mails, but I’m bound to get the next June 12 Campaign mail and there’s no way to make it stop. It is spam. My question is; is all Mailchimp mail spam? (Spoiler; only 93% of mine in the last year is.)

Identifying Mailchimp in Gmail

My mediocre solution for identifying Mailchimp mail is a gmail search for three special phrases in the message body, the current copy Mailchimp includes to provide their (not-very-effective) opt-out mechanisms. This text could change at any time, but it seems to be consistent for several years now. Here’s the search term, all three phrases:

“view this email in your browser”
“want to change how you receive these emails?”
“You can update your preferences or unsubscribe”

The better way to filter would be on an email header like X-Mailer, Received, or the DKIM signature. Gmail’s filters don’t seem to allow filtering on any of those criteria. Here’s an example spammy mail; maybe someone else has a better idea how to get Gmail to identify these. (There is a possibility involving Google Script but I can’t tell if that’s really a good idea to use.)

My Mailchimp statistics

In the past year I’ve gotten 57 Mailchimp mails. Maybe more if they went to the Spam folder and were auto-deleted. I have deliberately subscribed to 0 Mailchimp mailing lists, so in some sense all 57 are spam.

However, a whole lot of these Mailchimp mails come from organizations I legitimately have business with. Reed College being the primary culprit, also my local pizza place. I’d rather not get any of those emails, but they are in some sense organizations that have a reason and a right to email me. 54 of the 57 Mailchimp mails I got are in this category, or 93%. I’d rather not get any more of them.

3 of the 57 Mailchimp mails were things I actually wanted to get. Two from the XOXO conference, one from OpenStreetMap. Those organizations use Mailchimp responsibly in a way that helps me and even if I didn’t explicitly opt-in to a mailing list. I want these mails.

0 of the 57 Mailchimp mails were pure spam. None of them were from an organization I’d never heard of before. So that’s good! Update: not a day after writing this I got a pure spam Mailchimp mail, an ad for a Kickstarter game called “Cracked”.

Still, a 93% feels-spammy rate is pretty awful and Mailchimp should do better.

Mailchimp for recipients

AFAIK Mailchimp currently has essentially no product for email recipients. We’re not customers, we’re the product Mailchimp is selling. There’s this polite veneer that somehow we’ve opted in to these communications, and Mailchimp does provide opt-outs. But they aren’t really working.

My proposed solution is Mailchimp should build a small product for email recipients. Leave the defaults as-is, to not decimate Mailchimp’s business. But give users the chance to say “I never want to receive any Mailchimp mail from this organization again”. Not just opt-out of a specific list, but all lists from a particular Mailchimp customer. It’s not simple; Mailchimp would have to create an account for each email recipient with some small Web UI, passwords, etc. It’s not a tiny project, but it’s not a huge one either.

Of course Mailchimp won’t do this. They have no incentive to. Right until the moment someone like me gets fed up enough and considers blocking all of Mailchimp as spam. Imagine if Gmail did that; it would absolutely crush the company. Mailchimp should have a solution in hand before their spam problem escalates to the level of existential crisis.

(Even better would be to require an explicit opt-in from each organization, or for each mailing list. That’s how it used to work in the old Mailman days. But no way would Mailchimp do this; it’d destroy their business.)

An alternate thing Mailchimp could do is get more aggressive at policing their customers. There’s a feedback form when you unsubscribe that includes lines “This is spam and should be reported” as well as “I never subscribed to this list”. I faithfully click one or the other every time I get spam via Mailchimp, in the hopes it creates some signal inside the company and maybe their customer will be reined in. So far I see it having zero effect though, and why would it? The spammer is who is paying Mailchimp, not me.

I have several friends who work at Mailchimp. It’s a good company and they have a good product for their customers. But as a company I suspect they are myopic, focussed only on their paying customers. I’d like them to do more to stop spammy use of their product before it becomes a crisis.

Sending SMTP email: a decade approach

I decided it’d be handy to be able to send SMTP email from my server in a datacenter. You know, like we’ve done since 1982? Only in modern times it really sucks to do this because of protections against spam, email spoofing, etc. Also I don’t want some giant network mail thing running and creating security headaches, I just want to be able to send mail off-host.

It turned out to be easy on Ubuntu 14.04. I followed this guide which boils down to “configure Postfix to be an Internet site, then make the daemon only listen on the loopback interface”. The other setup that’s important is a PTR record, so reverse DNS works. I think even without that mail should in theory work, but everyone might assume you’re a spammer.

With that setup mail to me @gmail.com worked and I’m sending email like we did back in the 1980s. But it also got classified as spam, and monkey.org was refusing to talk to me at all. The problem turned out to be that postfix was configured to use the hostname “ubuntu”. I fixed it by using the same FQDN as the PTR record (which also resolves to the same IP). Both Gmail and monkey.org will deliver my mail and it shows up as non-spam.

So now we’re up to 1990s email. Still, Gmail complained the mail it got was unencrypted. That was fixed by enabling “smtp_tls_security_level = may”. No idea why that’s not the default; the Postfix docs warn “You also turn on thousands and thousands of lines of OpenSSL library code. Assuming that OpenSSL is written as carefully as Wietse’s own code, every 1000 lines introduce one additional bug into Postfix.”. Which is a bit snide but fair enough given the OpenSSL history.

And now we’re up to 2000s email. Our modern era is much more complicated, with SPF and DKIM and other half-assed DNS based solutions to making email a bit more authenticated, but not really fixing it entirely. Those measures don’t yet seem mandatory, at least for low volume email, so I don’t yet have 2010s email configured.

One thing I left unsolved; the From: address. Mail is showing up as being from “nelson@wk.somebits.com”, which is an address you can’t deliver to. I’m OK with that, could fix it by spoofing the email, changing the Postfix from header, and/or adding MX records to enable mail for somebits.com.

(The other option to all this falderall is to give up on SMTP and mailer daemons entirely, just use a proprietary mail API. GMail has something for sending mail based on OAuth, and Amazon has SES.)