[ILUG] null client configuration for sendmail

Walter Faleiro curtorkar at gmail.com
Wed Aug 30 14:38:52 IST 2006


Hi Badger,

Following is the info you need


[root at fedora ~]# rpm -qa | grep sendmail
sendmail-cf-8.13.4-2
sendmail-8.13.4-2
[root at fedora ~]# cat /etc/mail/sendmail.mc
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package
is
dnl # installed and then performing a
dnl #
dnl #     make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`Nullclient for Linux')dnl
OSTYPE(`linux')dnl
DOMAIN(`generic')dnl
FEATURE(`nullclient',`example.com')dnl
undefine(`ALIAS_FILE')dnl

[root at fedora ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
172.16.20.60    fedora.example.com       fedora


And yes,
I do type make -C /etc/mail.
Service sendmail restart.

My distribution is Fedora Core4. I think it should not be that different for
FC5, so you can list the steps for me to try out.


Regards,
--Walter


On 8/30/06, Badger <badger at scattermail.com> wrote:
>
> On Wed, Aug 30, 2006 at 06:49:44AM +0530, Walter Faleiro wrote:
> > On 8/30/06, Badger <badger at scattermail.com> wrote:
> > >
> > >On Tue, Aug 29, 2006 at 09:49:35PM +0530, Walter Faleiro wrote:
> > >> Hi,
> > >> 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
> > >> client.
> > >>
> > >> 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.comvia
> > >the
> > >> local mail server.
> > >>
> > >>
> > >> Regards,
> > >> --Walter
> > >
> > >
> > >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,
> > >Canada.
> > >
> > >I don't actually use sendmail so be cautious about any advise I offer
> > >about it.
> > >
> > >You can set up your host fedora.example.com as a nullclient using a
> > >sendmail.mc that looks something like the following:
> > >
> > >   OSTYPE(`linux')
> > >   FEATURE(`nullclient', `server1.example.com')
> > >
> > >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.
> > >
> > >- badge
> > >--
> > >Irish Linux Users' Group mailing list
> > >About this list : http://mail.linux.ie/mailman/listinfo/ilug
> > >Who we are : http://www.linux.ie/
> > >Where we are : http://www.linux.ie/map/
> > >
> >
> > Hi Badge,
> > I am looking for the first solution
> >
> > My sendmail.mc file looks something like
> >
> >
> > divert(-1)dnl
> > dnl #
> > dnl # This is the sendmail macro config file for m4. If you make changes
> to
> > dnl # /etc/mail/sendmail.mc, you will need to regenerate the
> > dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf
> package
> > is
> > dnl # installed and then performing a
> > dnl #
> > dnl #     make -C /etc/mail
> > dnl #
> > include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
> > OSTYPE(`linux')dnl
> > dnl # We're only a null client for the main mail server.
> > FEATURE(`nullclient',`server1.example.com')dnl
> >
> > But if I try to send the mail to peter it goes to
> > peter at fedora.example.com and not as peter at example.com
> >
> > Regards,
> > --Walter
> >
>
> Now you are typing 'make -C /etc/mail' after you edit this file aren't
> you? :)
>
> You also restarted the server, right? :)
>
> Also a good idea to check your DNS to make sure it's all set up
> correctly. Either you have set up the /etc/hosts file on
> fedora.example.com to believe that 'example.com' points to
> server1.example.com, or you have set up DNS with either an MX or
> an A record for 'example.com' which points to server1.example.com.
> Test this DNS stuff from the fedora.example.com host just in case
> your organization has some sort of split-DNS configuration.
>
> Is this a fedora installation as it's hostname suggests?
> If so, is it Fedora 5?
> If so, have you installed the sendmail-cf package?
>
> I'm asking because I have a Fedora Core 5 box here and it took me just a
> few minutes to set it up as a nullclient. If you have a similar set-up I
> can list the steps I took so that you can see if there are any obvious
> differences between what we have done.
>
> - badge
>
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
>



More information about the ILUG mailing list