On Mon, 24 Jul 2023, at 3:44 PM, Richard wrote:
I've tried using test@xxxxxxxxxxx as the username, but the "@example.org" is stripped off and only the username is passed through to saslauthd.
That's the part that's strange, to me. It feels like you're tripping on something here, and then trying to configure a realm as a solution (which doesn't work either, for whatever reason), but perhaps we can solve whatever you're tripping on at this stage.
Your original message mentioned you have these options configured:
defaultdomain: example.org
loginrealms: example.org
I would usually recommend leaving "defaultdomain" at its default value of "internal", setting "virtdomains: userid", and requiring all users to log in with their fully-qualified address (even if you only have one mail domain and don't intend to add more). Nobody would be able to log in as just "localpart" unless their email address was "localpart@internal", and presumably you wouldn't create user accounts like this cause mail delivery to that domain would be... challenging.
What I'm thinking here is, maybe the "@example.org" is being stripped off because it matches your defaultdomain? In which case putting defaultdomain back to something you don't use as a mail domain should solve that.
I'm not sure what "loginrealms" does, and reading the man page entry for it, I'm not any more enlightened. But that's another oddity that might be complicating things here. If you remove that, does anything change for the better?
Cheers,
ellie