Re: [Hampshire] Sendmail local users

Top Page

Reply to this message
Author: Jack Knight
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Sendmail local users
Graeme Hilton wrote:
> Hi,
>
> I'm having real difficulty getting Sendmail to accept mail for local
> users.
>
> I use fetchmail to collect mail from my ISPs POP3 service and that
> presents the mail to sendmail as <username>@localhost. All is well as
> the mail is accepted and shunted off to procmail. I use the ISPs
> tools to set aliases and suchlike on their system so it all ends up in
> the correct POP3 boxes. No problem there.
>
> However, when a local user (for instance, my brother) wants to send me
> an email he addresses it as first.lastname@??? and then his
> mail client connects to port 25. Sendmail rejects this as
> first.lastname is an "Unknown User".
>
> Which part of sendmail is it that can translate first.lastname into
> username, and how can I turn that feature on?

Put details in /etc/aliases like so:
firstname.lastname: localname

e.g.

Jack.Knight: jfk

... lack of fqdn on RHS means local user. You can also define lists here
like so:

freinds: adam,alan,charles,dave,earl@???

and so on. You can also cascade lists - in this example the "friends"
once defined on the LHS can be used on the RHS and sendmail will expand
the lists recursively. Hope this isn't too much info.

Test with "sendmail -bv firstname.lastname"

Then for belt & braces approach (should happen automatically these days)
rebuild alias db file with "sendmail -bi"

HtH

jfk

[snip]
>