[ILUG] null client configuration for sendmail

Badger badger at scattermail.com
Wed Aug 30 16:29:41 IST 2006


On Wed, Aug 30, 2006 at 07:08:52PM +0530, Walter Faleiro wrote:
> 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


Walter, I just took the sendmail.mc that you posted and ran it on my
machine (changing the `example.com', to `gonzo.example.com'). It worked
without a problem. As soon as I restarted the server, and mail that I
sent to badger went to badger at gonzo.example.com instead of to the local
account.

I will go through the steps I took earlier to get sendmail up and
working in the first place, but I can't see that there is anything in
there that will help you. 

You don't mention how DNS is set up for 'example.com'. Perhaps you could
check the following:
$ cat /etc/resolv.conf
$ dig +short example.com a       # From fedora.example.com
$ dig +short example.com mx      # From fedora.example.com

I don't suppose there are any clues in the mail log file
/var/log/maillog?

The steps I carried out earlier to get this up and working on FC5 are
going to sound primative in comparison to what you have done:

1. Upgrade sendmail package and install the sendmail-cf package:
    $ yum upgrade sendmail
    $ yum install sendmail

2. Copy the new sendmail.mc from /etc/mail/sendmail.mc.rpmnew into place
   as /etc/mail/sendmail.mc and edit it as follows:
    (i)  comment out all MAILER macros
    (ii) add "FEATURE(`nullclient', `gonzo.example.com')dnl" to end of
         file

3. do 'make -C /etc/mail'

4. Restart server

5. Test the new configuration as user badger, using /bin/mail as
   follows: 
      $ echo "hello world" | mail -s test badger

6. The result is that mail is now sent to account of badger on
   gonzo.example.com, not the local badger account.

Not much point in me posting the sendmail.mc that I used then since the
one you posted earlier works fine on my machine (and the one I used is 
175 lines long and is full of crap).

I don't have an MX record for gonzo.example.com, but I do have an A
record, so:
$ dig +short gonzo.example.com a 
172.16.12.14

Any further thoughts?

- badge




More information about the ILUG mailing list