Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sendmail and user accounts containing the domain --> "user@domain.com"

14 views
Skip to first unread message

fuogoi...@gmail.com

unread,
Apr 12, 2008, 7:50:57 PM4/12/08
to
I have create user accounts under Linux as us...@domain.com, which
creates their home directories just fine. I can retrieve mail for
these accounts just fine but Sendmail is refusing to find these
accounts. It seems to shop off the domain name by default and only
looks for accounts using the "user" part of the address.

How do I configure Sendmail to deliver mail to users named
"us...@domain.com" instead of just "user"?

D. Stussy

unread,
Apr 12, 2008, 9:10:48 PM4/12/08
to
<fuogoi...@gmail.com> wrote in message
news:73dab499-2180-400a...@a23g2000hsc.googlegroups.com...

feature virtusers

@example.com %1


fuogoi...@gmail.com

unread,
Apr 12, 2008, 9:31:21 PM4/12/08
to
On Apr 12, 9:10 pm, "D. Stussy" <s...@bde-arc.ampr.org> wrote:
> <fuogoitali...@gmail.com> wrote in message
>
> news:73dab499-2180-400a...@a23g2000hsc.googlegroups.com...
>
> > I have create user accounts under Linux as u...@domain.com, which

> > creates their home directories just fine. I can retrieve mail for
> > these accounts just fine but Sendmail is refusing to find these
> > accounts. It seems to shop off the domain name by default and only
> > looks for accounts using the "user" part of the address.
>
> > How do I configure Sendmail to deliver mail to users named
> > "u...@domain.com" instead of just "user"?
>
> feature virtusers
>
> @example.com    %1

Didn't work. It's still delivering mail to "user" instead of
"us...@domain.com". Both accounts are active under Linux.

Kari Hurtta

unread,
Apr 13, 2008, 2:08:34 AM4/13/08
to
fuogoi...@gmail.com writes in comp.mail.sendmail:

Hmm. Create new mailer to sendmail config.


Mails to host are directed to

Mlocal, ....


on sendmail config.

That line referes to rulesets: S=EnvFromL/HdrFromL, R=EnvToL/HdrToL


These rulesets (specially EnvToL) strips domain part.

So you need new mailer

Mlocaldomain, ....

which refers to different rulesets.

And then on mailertable or on sendmaal.cf directly
direct mails for @domain to localdomain -mailer.


/ Kari Hurtta

Andrzej Adam Filip

unread,
Apr 13, 2008, 2:14:53 AM4/13/08
to
fuogoi...@gmail.com wrote:

FEATURE(`virtusertable')

virtusertable entries:
us...@example.com user\@example.com
@example.net %1\@example.net

backslash before @ should make sendmail "not see" @ in the address as
special character.

WARNING:
us...@example.com *WILL NOT* get ~/.forward file processing

--
[pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
It is a human characteristic to love little animals, especially if
they're attractive in some way.
-- McCoy, "The Trouble with Tribbles", stardate 4525.6

Andrzej Adam Filip

unread,
Apr 13, 2008, 2:19:22 AM4/13/08
to
Kari Hurtta <hurtta+comp....@siilo.fmi.fi> wrote:

> fuogoi...@gmail.com writes in comp.mail.sendmail:
>
>> I have create user accounts under Linux as us...@domain.com, which
>> creates their home directories just fine. I can retrieve mail for
>> these accounts just fine but Sendmail is refusing to find these
>> accounts. It seems to shop off the domain name by default and only
>> looks for accounts using the "user" part of the address.
>>
>> How do I configure Sendmail to deliver mail to users named
>> "us...@domain.com" instead of just "user"?
>
> Hmm. Create new mailer to sendmail config.
>
>
> Mails to host are directed to
>
> Mlocal, ....
>
>
> on sendmail config.
>
> That line referes to rulesets: S=EnvFromL/HdrFromL, R=EnvToL/HdrToL
>
>
> These rulesets (specially EnvToL) strips domain part.
>
> So you need new mailer
>
> Mlocaldomain, ....
>
> which refers to different rulesets.

OK [ I would prefer "local-dom" name ]

> And then on mailertable or on sendmaal.cf directly
> direct mails for @domain to localdomain -mailer.

Or a small fix in cf/m4/proto.m4 to slect the new mailer
(localdomain/local-dom) for some/all local email domains.

P.S.
Standards sendmail.cf rules strip domain when selecting local mailer for
delivery even without help of "per mailer" rule sets.

--
[pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/

Lay on, MacDuff, and curs'd be him who first cries, "Hold, enough!".
-- Shakespeare

Kari Hurtta

unread,
Apr 13, 2008, 2:53:13 AM4/13/08
to
Andrzej Adam Filip <an...@onet.eu> writes
in comp.mail.sendmail:

> Kari Hurtta <hurtta+comp....@siilo.fmi.fi> wrote:
>
> > fuogoi...@gmail.com writes in comp.mail.sendmail:
> >
> >> I have create user accounts under Linux as us...@domain.com, which
> >> creates their home directories just fine. I can retrieve mail for
> >> these accounts just fine but Sendmail is refusing to find these
> >> accounts. It seems to shop off the domain name by default and only
> >> looks for accounts using the "user" part of the address.
> >>
> >> How do I configure Sendmail to deliver mail to users named
> >> "us...@domain.com" instead of just "user"?
> >
> > Hmm. Create new mailer to sendmail config.
> >
> >
> > Mails to host are directed to
> >
> > Mlocal, ....
> >
> >
> > on sendmail config.
> >
> > That line referes to rulesets: S=EnvFromL/HdrFromL, R=EnvToL/HdrToL
> >
> >
> > These rulesets (specially EnvToL) strips domain part.
> >
> > So you need new mailer
> >
> > Mlocaldomain, ....
> >
> > which refers to different rulesets.
>
> OK [ I would prefer "local-dom" name ]
>
> > And then on mailertable or on sendmaal.cf directly
> > direct mails for @domain to localdomain -mailer.
>
> Or a small fix in cf/m4/proto.m4 to slect the new mailer
> (localdomain/local-dom) for some/all local email domains.

That stripping is still needed for other domains which are
on $=w

user@localhost need to be delivered to 'user'
user@hostname need to be delivered to 'user'


>
> P.S.
> Standards sendmail.cf rules strip domain when selecting local mailer for
> delivery even without help of "per mailer" rule sets.

Yes.


It seems that that "per mailer" strip domain is only needed when
local -mailer is selected from mailertable.

And even when mailertable selects local mailer, CanonLocal is called.

But if I read it correctly, CanonLocal allows user@domain passed
to local -mailer.


> --
> [pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
> Open-Sendmail: http://open-sendmail.sourceforge.net/
> Lay on, MacDuff, and curs'd be him who first cries, "Hold, enough!".
> -- Shakespeare

/ Kari Hurtta

D. Stussy

unread,
Apr 13, 2008, 3:01:30 AM4/13/08
to
<fuogoi...@gmail.com> wrote in message
news:d26c25d4-e308-43b4...@l64g2000hse.googlegroups.com...

--------
Sorry, I misread. I thought you wanted local delivery.


Andrzej Adam Filip

unread,
Apr 13, 2008, 9:31:49 AM4/13/08
to
Kari Hurtta <hurtta+comp....@siilo.fmi.fi> wrote:

I have created a *simple* hook (custom ruleset) called for local email
domains just before classic selection of local mailer via patch to
cf/m4/proto.m4.
It will allow to select local-dom mailer for *some* local domains.
Rule set 5 can be used to redirect non existing "us...@example.com" to
"user" for such domains.

http://open-sendmail.cvs.sourceforge.net/*checkout*/open-sendmail/open-sendmail/cf/m4/local-domain-routing.patch

>> P.S.
>> Standards sendmail.cf rules strip domain when selecting local mailer for
>> delivery even without help of "per mailer" rule sets.
>
> Yes.
>
> It seems that that "per mailer" strip domain is only needed when
> local -mailer is selected from mailertable.
>
> And even when mailertable selects local mailer, CanonLocal is called.
>
> But if I read it correctly, CanonLocal allows user@domain passed
> to local -mailer.


--
[pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/

Cure the disease and kill the patient.
-- Francis Bacon

Andrzej Adam Filip

unread,
Apr 13, 2008, 9:41:29 AM4/13/08
to
fuogoi...@gmail.com wrote:

Would you like to *test* solution for better support of
"local account with domain in name" than offered by
virtusertable "hack"?

e.g. the solution would support aliasing and ~/.forward files (I think).

The solution would require no recompilation of sendmail binaries, it
would require patching of one m4 file used to generate sendmail.cf
[cf/m4/proto.m4] and adding 2 or 3 new m4 files to files used to
generate sendmail.cf.

--
[pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/

Every why hath a wherefore.
-- William Shakespeare, "A Comedy of Errors"

fuogoi...@gmail.com

unread,
Apr 13, 2008, 7:26:24 PM4/13/08
to
On Apr 13, 2:14 am, Andrzej Adam Filip <a...@onet.eu> wrote:

> fuogoitali...@gmail.com wrote:
> > On Apr 12, 9:10 pm, "D. Stussy" <s...@bde-arc.ampr.org> wrote:
> >> <fuogoitali...@gmail.com> wrote in message
>
> >>news:73dab499-2180-400a...@a23g2000hsc.googlegroups.com...
>
> >> > I have create user accounts under Linux as u...@domain.com, which
> >> > creates their home directories just fine. I can retrieve mail for
> >> > these accounts just fine but Sendmail is refusing to find these
> >> > accounts. It seems to shop off the domain name by default and only
> >> > looks for accounts using the "user" part of the address.
>
> >> > How do I configure Sendmail to deliver mail to users named
> >> > "u...@domain.com" instead of just "user"?
>
> >> feature virtusers
>
> >> @example.com %1
>
> > Didn't work. It's still delivering mail to "user" instead of
> > "u...@domain.com". Both accounts are active under Linux.

>
> FEATURE(`virtusertable')
>
> virtusertable entries:
> u...@example.com user\@example.com

> @example.net %1\@example.net
>
> backslash before @ should make sendmail "not see" @ in the address as
> special character.
>
> WARNING:
> u...@example.com *WILL NOT* get ~/.forward file processing
>
> --
> [pl>en: Andrew] Andrzej Adam Filip a...@xl.wp.pl

> Open-Sendmail:http://open-sendmail.sourceforge.net/
> It is a human characteristic to love little animals, especially if
> they're attractive in some way.
>   -- McCoy, "The Trouble with Tribbles", stardate 4525.6- Hide quoted text -
>
> - Show quoted text -


Thank you! That solved the problem.

umau...@gmail.com

unread,
Apr 14, 2008, 10:43:29 AM4/14/08
to
On Apr 13, 9:41 am, Andrzej Adam Filip <a...@onet.eu> wrote:
> fuogoitali...@gmail.com wrote:
> > I have create user accounts under Linux as u...@domain.com, which

> > creates their home directories just fine. I can retrieve mail for
> > these accounts just fine but Sendmail is refusing to find these
> > accounts. It seems to shop off the domain name by default and only
> > looks for accounts using the "user" part of the address.
>
> > How do I configure Sendmail to deliver mail to users named
> > "u...@domain.com" instead of just "user"?

>
> Would you like to *test* solution for better support of
> "local account with domain in name" than offered by
> virtusertable "hack"?
>
> e.g. the solution would support aliasing and ~/.forward files (I think).
>
> The solution would require no recompilation of sendmail binaries, it
> would require patching of one m4 file used to generate sendmail.cf
> [cf/m4/proto.m4] and adding 2 or 3 new m4 files to files used to
> generate sendmail.cf.
>
> --
> [pl>en: Andrew] Andrzej Adam Filip a...@xl.wp.pl

> Open-Sendmail:http://open-sendmail.sourceforge.net/
> Every why hath a wherefore.
>   -- William Shakespeare, "A Comedy of Errors"

I'd like to test your solution. However, the '\@\ hack works fine in
delivering received email but I can't authenticate users sending
through SMTP. It still chops off the domain part when authenticating a
sending user.

Andrzej Adam Filip

unread,
Apr 14, 2008, 2:12:52 PM4/14/08
to
umau...@gmail.com wrote:

> [...] the '\@\ hack works fine in delivering received email but I


> can't authenticate users sending through SMTP. It still chops off the
> domain part when authenticating a sending user.

What have you configured in sasl2 configuration file for sendmail?
[ /usr/lib/sasl2/Sendmail.conf ? ]

--
[pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
"If you are beginning to doubt what I am saying,
you are probably hallucinating."
-- The Firesign Theatre, _Everything you know is Wrong_

Andrzej Adam Filip

unread,
Apr 14, 2008, 4:41:39 PM4/14/08
to
umau...@gmail.com wrote:

> [...] the '\@\ hack works fine in


> delivering received email but I can't authenticate users sending
> through SMTP. It still chops off the domain part when authenticating a
> sending user.

Have you tries to use sasldb for storing *separate* SMTP/POP/IMAP
passwords?
AFAIR sasldb makes sendmail require domain in SMTP AUTH.

URL(s):
http://groups.google.com/group/comp.mail.sendmail/msg/009e347baee78712

--
[pl>en: Andrew] Andrzej Adam Filip an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
Nonsense. Space is blue and birds fly through it.
-- Heisenberg

0 new messages