Problem solved, I had to make sure the headers were properly formatted with a colon rather than an equals sign.
I tried looking at the mbox import script, but it seems to be missing a bunch of stuff, as noted in this post:
Anyway, I wanted to play with creating the user IDs (mailman doesn’t use them) because what I’m doing is importing 20 years worth of archives and a lot of those users are no longer around or using different email addresses. I’ve got around 700 users from the old system in the database now, adding 100,000 posts might present some other issues.
I dropped the staged=true field, it didn’t appear to be working anyway.
It took me an evening to write some PHP tools that parsed all those Mailman pipermail archives and built a set of user IDs, which wasn’t too bad.