Saslauthd and @domain.com

SYSTEM INFORMATION
OS type and version Alma 9.6
Webmin version 2.402
Virtualmin version 7.30.8
Webserver version 2.4.62
Related packages Cyrus-sasl 2.1.27-21
Dovecot 2.3.16

Trying to make Virtualmin work, straight from the box as it were.

Servers are setup with “mail” users as “username”
Client Software insists on sending “username@domain.com” as login. (Outlook)

Checking mail, easy peasy, change /etc/dovecot/conf.d/10-auth.conf, down a ways, to this:
auth_username_format = %Ln

So, now I can check mail, perfect every time

But sending… Cyrus may have such a switch, but I can’t find it, and so postfix just sends the @domain.com part, which of course immediately fails.

I can fix this, by simply switching postfix to use dovecot authorization, but I have just spent days trying to upgrade a server because I wanted to eliminate my little fixes, and this is the last thing I am stuck on.

Anyone have a fix for this, making saslauth strip the domain name?

(No, not gonna force my clients to use user@domain.com authentication, that would be WAY more work, and frankly not a win for my inner Unix Admin.)

This should work, by default. user@domain.tld is the default username format, assuming you installed using our install script.

If that’s not working, something either went wrong, you changed the username format, you created the mail users some other way, or they were restored from backups with some other username format configuration.

Yes, used the default script.
Migrated using most of the instructions (ignored the “restore virtualmin settings” part).
So the users are not in the “new” format, but the format they were setup with in 2004 or before.

username@domain.tld is nice today, but was unheard of 20 years ago.

And yes, the mail accounts on here are at least that old.

So, removed the -r in the saslauthd, that didn’t work either.

Answer is to move to Dovecot Auth?

Whoops, spoke too soon, in /etc/sysconfig/saslauthd is this:

Additional flags to pass to saslauthd on the command line. See saslauthd(8)

for the list of accepted flags.

FLAGS=“-r”

Remove the -r, users authenticate correctly with or without the domain name.

Thanks for the help, learned all sorts of things today.

1 Like