Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Nov 2005 19:08:31 -0800
From:      Greg Maruszeczka <greg@grokking.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Configuring default 6.0 install to send mail
Message-ID:  <4372B9AF.8000300@grokking.org>
In-Reply-To: <BAY13-F8201C453632D3B8FD8402F3660@phx.gbl>
References:  <BAY13-F8201C453632D3B8FD8402F3660@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
Brooke Landers wrote:
> Hello list. I am learning FreeBSD and I'd like to know how to configure
> Sendmail to simply forward mail although it seems it's doing this by
> default. I can send mail, but it's being rejected since
> mylocalhost.mydomain.com doesn't resolve. I'm using internal hosts that
> will never have DNS entries.
> 
> I'm looking for somewhere where I can specify that user@mylocalhost can
> send mail as user@mydomain.com. I'm pretty sure that my mail would be
> accepted if I can do this.
> 
> I don't want to set up a mail server, I'd just like to know how I can
> get my logs and admin mail forwarded to an external address. I apologize
> for not sending this to a sendmail list, but I figured there may be
> something simple and specific to FreeBSD that I have overlooked.
> 
> Thank you for any help :)
> BL
> 


If that's all you want to do the simplest thing is this (as root):

cd /etc/mail
vi aliases

Look for the entry for root: uncomment it and add whatever external
address you want after the colon. After saving and exiting:

newaliases

Now all system mail should be sent to the external address you specified
in /etc/mail/aliases.

Test it by doing this:

mail -s "Test" root
<ctrl-d>

G



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