Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Nov 2009 09:25:59 +0700 (ICT)
From:      Olivier Nicole <Olivier.Nicole@cs.ait.ac.th>
To:        wblock@wonkity.com
Cc:        questions@freebsd.org
Subject:   Re: How to configure sendmail
Message-ID:  <200911090225.nA92PxYp079632@banyan.cs.ait.ac.th>
In-Reply-To: <alpine.BSF.2.00.0911060754570.81381@wonkity.com> (message from Warren Block on Fri, 6 Nov 2009 08:12:14 -0700 (MST))
References:  <alpine.BSF.2.00.0911060754570.81381@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I apologize if I was not clear enough. I answer youe questions and try
to be more clear at the bottom.

> > I have this stupide little configuration that I cannot manage to get 
> > working.
> > 
> > I have one machine a.domain.net that I want to be able to deliver
> > system mail (like cron and so on) with the following rules:
> > 
> > - user1 on a.domain.net has the same username as on domain.net; I
> >   want that mail sent to user1 is delivered to user1@domain.net;
> An alias will do that.

Only I don't want to define an alias for each and every user.

> > - user2 on a.domain.net has no corresponding user on domain.net, but
> >   it has an alias defined; I want to mail sent to user2 is delivered
> >   to the alias.
> 
> Creating an alias for a nonexistent user seems to work here.

user2 aliases to an existing account on some other place.

> > - of course, mail addressed to a full address x@y.z should be
> >   delivered accordingly, eventually using a mail relay.
> 
> > I tried using masquerade in submit.mc,
> I don't edit submit.mc, just <hostname>.mc.

I shall try that.

> >  user1 is then rewritten as user1.domain.net,
> That's the masquerade...  Wait, is that a typo?  Should be 
> "user1@domain.net"?

Right, that was a typo.

> > but the alias for user2 is not parsed
> 
> newaliases(1) is needed after editing /etc/mail/aliases.  And there is a 
> bug if you're using 8.0:

Yes I did newaliases and the version of sendmail is the default with
FreeBSD, that must be 8.14.3

> Masquerade again.  Not clear whether that's what you want.

How to configure sendmail on a.domain.net so that:

1) users with an alias defined in /etc/mail/aliases have their
  messages sent to the alias;

2) users with no alias have their mail sent to user@domain.net (same
  username).

It seems that masquerade does the part 2) but users in 1) are not sent
to the alias.

Best regards,

Olivier



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