sendmail help needed

Dear Lazyweb, please be my sendmail bitch.

I have an OpenBSD 3.5 machine ("membrane") running sendmail 8.12.11. I want all mail originating on that machine to be delivered to my mail host ("nucleus"), instead of being delivered locally. I can't figure out any way to make this happen; no matter what I try, mail to root still gets delivered into the local /var/mail/ without ever making an attempt to contact the mail host.

<LJ-CUT text=" --More--(11%) ">

Setting SMART_HOST has worked on every Linux machine I've used in the last decade, so I don't see why it won't work here.

(This machine sends almost no mail -- just the occasional cron job -- so I don't want to hear any crap about how great something-other-than-sendmail is. Don't make me ban you.)

So, in /etc/mail/aliases, I have:

    root: jwz
    jwz: jwz@nucleus.dnalounge.com

/etc/rc.conf says:

    sendmail_flags="-L sm-mta -C/etc/mail/localhost.cf -bd -q30m"

In /usr/share/sendmail/cf/openbsd-localhost.mc I have:

    define(`SMART_HOST',`nucleus.dnalounge.com')

which means that /usr/share/sendmail/cf/openbsd-localhost.cf, /etc/mail/localhost.cf, and /etc/mail/sendmail.cf all say:

    DSnucleus.dnalounge.com

I also tried adding "DHnucleus" to the .cf files. No luck.

There is nothing in /etc/mail/local-host-names.

(Yes, I have newaliased, HUPped, and even rebooted.)

Oddly, doing "Mail jwz@dnalounge.com" produces a bounce from localhost that says

    MX list for dnalounge.com. points back to membrane.dnalounge.com

which is just not true!

    % dig dnalounge.com mx | grep MX
    ;dnalounge.com.        IN  MX
    dnalounge.com.   3600  IN  MX  5 nucleus.dnalounge.com.

(Note, that's "internal" DNS, you will see different results if you run that from where you are sitting right now.)

When I do this:

    % date | Mail -vs test jwz

    jwz... Connecting to [127.0.0.1] via relay...
    220 membrane.dnalounge.com ESMTP Sendmail 8.12.11/8.12.11;
       Sat, 22 Jan 2005 01:01:59 -0800 (PST)
    >>> EHLO membrane.dnalounge.com
    250-membrane.dnalounge.com Hello smmsp@localhost [127.0.0.1],
       pleased to meet you
    250-ENHANCEDSTATUSCODES
    250-PIPELINING
    250-EXPN
    250-VERB
    250-8BITMIME
    250-SIZE
    250-DSN
    250-ETRN
    250-DELIVERBY
    250 HELP
    >>> MAIL From:<jwz@membrane.dnalounge.com> SIZE=52
    250 2.1.0 <jwz@membrane.dnalounge.com>... Sender ok
    >>> RCPT To:<jwz@membrane.dnalounge.com>
    >>> DATA
    250 2.1.5 <jwz@membrane.dnalounge.com>... Recipient ok
    354 Enter mail, end with "." on a line by itself
    >>> .
    250 2.0.0 j0M91xEd006943 Message accepted for delivery
    jwz... Sent (j0M91xEd006943 Message accepted for delivery)
    Closing connection to [127.0.0.1]
    >>> QUIT
    221 2.0.0 membrane.dnalounge.com closing connection

This gets logged:

    Jan 22 01:01:59 membrane sendmail[6497]: j0M91xPN006497:
     from=jwz, size=52, class=0, nrcpts=1,
     msgid=<200501220901.j0M91xPN006497@membrane.dnalounge.com>,
     relay=root@localhost
    Jan 22 01:01:59 membrane sm-mta[6943]: j0M91xEd006943:
     from=<jwz@membrane.dnalounge.com>, size=384, class=0, nrcpts=1,
     msgid=<200501220901.j0M91xPN006497@membrane.dnalounge.com>,
     proto=ESMTP, daemon=MTA, relay=smmsp@localhost [127.0.0.1]
    Jan 22 01:01:59 membrane sendmail[6497]: j0M91xPN006497:
     to=jwz, ctladdr=jwz (500/500), delay=00:00:00,
     xdelay=00:00:00, mailer=relay, pri=30052,
     relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0,
     stat=Sent (j0M91xEd006943 Message accepted for delivery)
    Jan 22 01:01:59 membrane sm-mta[11426]: j0M91xEd006943:
     to=<jwz@membrane.dnalounge.com>,
     ctladdr=<jwz@membrane.dnalounge.com> (500/500),
     delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30635,
     dsn=2.0.0, stat=Sent

And this shows up in /var/mail/jwz on membrane:

    From jwz@membrane.dnalounge.com Sat Jan 22 01:01:59 2005
    Received: from membrane.dnalounge.com (smmsp@localhost [127.0.0.1])
     by membrane.dnalounge.com (8.12.11/8.12.11)
     with ESMTP id j0M91xEd006943
     for <jwz@membrane.dnalounge.com>;
     Sat, 22 Jan 2005 01:01:59 -0800 (PST)
    Received: (from root@localhost)
     by membrane.dnalounge.com (8.12.11/8.12.11/Submit)
     id j0M91xPN006497
     for jwz; Sat, 22 Jan 2005 01:01:59 -0800 (PST)
    Date: Sat, 22 Jan 2005 01:01:59 -0800 (PST)
    From: Jamie Zawinski <jwz@membrane.dnalounge.com>
    Message-Id: <200501220901.j0M91xPN006497@membrane.dnalounge.com>
    To: jwz@membrane.dnalounge.com
    Subject: test

    Sat Jan 22 01:01:59 PST 2005

Note complete lack of any mention of nucleus. (I get the same result if I mail to "jwz@nucleus.dnalounge.com" instead of just "jwz".)

According to "host", membrane does realize that membrane and nucleus have different IP addresses.

Any ideas?

Update: Fixed! The answer is, put FEATURE(`msp', `nucleus.dnalounge.com') in submit.mc, and don't screw around with "smart_host" or "nullclient" at all. Thanks a lot to all those who helped.

Tags: , , , , ,