Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2013 03:17:12 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Modulok <modulok@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Case sensitive usernames and sendmail - mystic voodoo
Message-ID:  <20130527031712.a6cbecf2.freebsd@edvax.de>
In-Reply-To: <CAN2%2BEpbZgS5rNKRs=GduqS54tVrDYFbO%2BgLAnbyFHS-sUAq2Pw@mail.gmail.com>
References:  <CAN2%2BEpbZgS5rNKRs=GduqS54tVrDYFbO%2BgLAnbyFHS-sUAq2Pw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@example.com, FOO@example.com and Foo@example.com
and all upper/lowercase variations are the same as foo@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130527031712.a6cbecf2.freebsd>