Case sensitive usernames and sendmail - mystic voodoo

Polytropon freebsd at edvax.de
Mon May 27 01:25:28 UTC 2013


On Sun, 26 May 2013 18:44:41 -0600, Modulok wrote:
> I know usernames are case-sensitive, I thought emails were
> too.

If I remember e-mail basics correctly: No. They're not.
For example, foo at example.com, FOO at example.com and Foo at example.com
and all upper/lowercase variations are the same as foo at example.com.
For sending mail within a system and across systems, names
in the passwd file have to be in conjunction with the
respective mail queues for the users. Even "foo" and "Foo"
can coexist (as soon as they have a different UID, reflecting
the fact that two distinguishable users are intended), but
regarding mail... that sounds problematic.



> Without fighting an epic battle with with the sendmail configs, is
> there a simple way to make this work?

Use lowercase usernames only. Make it a convention.
Verify it.



> The obvious answer is probably, "usernames should be lowercase!" and for
> new users I'll enforce that policy. For existing users however, who may
> already have lots of case-sensitive usernames in various config files,
> etc this isn't a real option.

That's true, but didn't this approach get you in trouble earlier?



> By just altering their usernames I'm
> afraid I'd break the whole damn universe.

This is quite possible. As you mentioned correctly, usernames
with uppercase letters may already appear in config files.
You _could_ check for each user below his $HOME for any
appearing in a file and replace this, but that could cause
trouble if something is stored in a "Registry"-like binary file.
Regarding /etc/passwd, the home directory _may_ be a different
name than the username, so those _pathnames_ in files should
not require a change. But files mentioning _usernames_ will
probably cause problems.



> How can I enable mail for
> them?

Maybe it's possible to use /etc/mail/aliases?



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list