On Tue, Aug 29, 2006 at 09:49:35PM +0530, Walter Faleiro wrote:
> I have a hostname fedora and my domainname is walter.com. The mail server
> for our domain is server1.walter.com. When I try to send mails from my linux
> system it goes as
>>walter at fedora.walter.com.>> I can masquerade the same so that the email appears as walter at walter.com.>> I need help in setting up the sendmail on my linux system "fedora" as a null
>> so mail peter
>> Would send the mail to peter at walter.com, via our relay mail server
> server1.walter.com. Instead of sending it to peter at fedora.walter.com via the
> local mail server.
There are a few things to note here.
Probably best not to say "my domain is walter.com" unless it actually
is. The "example.com", "example.org" and "example.net" domains are
reserved specifically for example cases like this. For the rest of the
mail I'm going to assume that you used example.com because I don't
want to go making statements about some company's network in Quebec,
I don't actually use sendmail so be cautious about any advise I offer
You can set up your host fedora.example.com as a nullclient using a
sendmail.mc that looks something like the following:
However, I don't think that this is actually what you want. This
configuration is intended for a machine that does not accept it's own
mail: It basically says, "deliver all mail, no matter who it's for, to
server1.example.com". Think about the potential for mail loops here -
'all mail' means what it says on the tin.
Such a configuration might be appropriate if you had an imap
server on server1.example.com which accepted mail for all users in
example.com. On a site where you wanted to relay mail out to hosts like
fedora.example.com you could possibly get this type of configuration to
work by abusing the EXPOSED_USER macro, but I certainly don't recommend
going this route.
Personally, I would suggest going the route of setting up a shared
imap server on server1.example.com (or some other server), but if you
are adamant that you want mail delivered to many different hosts on your
network, then you might want to look into using a common mail aliases
database on each machine. That way each host would know that:
peter: peter at fedora.example.com
leetgeek: leetgeek at gentoo.example.com
For a large site with many hosts accepting mail you'll want to look into
LDAP (or failing that, NIS) to share this aliases database, but for a
small site you can just copy it out to the relevant hosts.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!