Caps with sendmail

Matthew Seaman m.seaman at
Tue May 20 01:32:22 PDT 2003

On Tue, May 20, 2003 at 12:00:24AM -0700, Chris P wrote:
> I have 1 user that really prefers capital's for his account name.  Only
> problem is email to that account does not seem to work.  Does anyone know
> if sendmail has issues with capitals?   When anyone emails that account,
> my machine replies with "user unknown".  I've tried setting aliases, and
> everything I can think of.. Nothing gets through to that account.
> Any ideas?  Not a real big deal.. Just would be nice to know.
> It was both on FreeBSD 4.8 and 5.0

Putting capital letters into Unix usernames is generally not
recommended --- as you've found out, sendmail will convert the name to
lowercase before trying to look it up in the password database.
That's not just sendmail being annoying: it does that because the
standards say that e-mail addressing should be case insensitive.  You
can get round it with sendmail, but it may cause you grief in other
ways and with other software packages.

Here's a suggestion: you can give your user a lower case username but
a capitalised e-mail address fairly easily.  Look at
/usr/share/sendmail/cf/README, in particular the sections about
genericstable and virtusertable.  In a nutshell, you add:

    FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl

to your /etc/mail/`hostname`.mc and say, put in a line:

    fred Fred.Bloggs

into the /etc/mail/genericstable file -- this controls the conversion
fred at -> Fred.Bloggs at on the
outgoing mail.

For incoming e-mail, you either need to use an alias:

    Fred.Blogs:  fred

or the equivalent in /etc/mail/virtusertable --- I wouldn't bother
with virtusertable unless you're running a complicated mail system
serving e-mail for several domains.

Otherwise, if you really, really must have your user with uppercase
letters in their username, then you need to add 'u' to the local
mailer flags.  In /etc/mail/`hostname`.mc add:




Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list