(Re-sending lost comments:)

>> Do you know that principals must have exactly one `@`?
>
> No, but if it's wrong, then the pre-existing `principal_realm` function right above this one is also wrong.

But `principal_realm` is only called on the sender of incoming messages, which is more likely to have exactly one `@` than strings parsed from the CC line in a zephyr.