[ILUG] null client configuration for sendmail

Badger badger at scattermail.com
Thu Aug 31 16:14:16 IST 2006


On Thu, Aug 31, 2006 at 02:36:08PM +0100, Badger wrote:
> On Thu, Aug 31, 2006 at 08:05:21AM +0530, Walter Faleiro wrote:
> > Hi Badger,
> > As I had said earlier, the configuration did not work as it still sent the
> > mail to walter at fedora.example.com instead of watler at example.com.
> > Will work with what the further post says and call it quits.
> > 
> > Thanks again,
> > --Walter.
> >


My last post should give you a workable solution to your problem, but I
just wanted to add an additional note about the nullclient configuration
that we discussed initially. An important point that you didn't seem to
pick up on was that the nullclient configuration actually works for me - 
it does what you want it to do. I provide the relevant output below for 
you to inspect. 

At this point of the thread you suggested that what you actually wanted 
was to have mail delivered directly to your server server02 - you said:

   "How do I make the first one connect to server02 via relay 
    instead of connecting to 127.0.0.1"

This is what led me to changing th configuration of submit.mc and heading
down that road (which also works).

The point is that these solutions actually work. If none of it is 
working for you it suggests to me that something other than sendmail 
is misconfigured on your fedora box: your DNS, your hostname, your 
/etc/nsswitch.conf, or something else like that. It really looks 
to me that sendmail is not to blame.


This is the sendmail.mc that you provided:

-- snip --
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
-- snip --


When I run sendmail with this configuration, it works perfectly (read it
fully):


[badger at kermit sendmail.01] echo "big test" | mail -v -s "test mail" badger
badger... Connecting to [127.0.0.1] via relay...
220 kermit.example.com ESMTP Sendmail 8.13.7/8.13.7; Thu, 31 Aug 2006 15:32:14 +0100
>>> EHLO kermit.example.com
250-kermit.example.com Hello localhost.localdomain [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
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<badger at kermit.example.com> SIZE=38
250 2.1.0 <badger at kermit.example.com>... Sender ok
>>> RCPT To:<badger at kermit.example.com>
>>> DATA
250 2.1.5 <badger at kermit.example.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <badger at kermit.example.com>... Connecting to mail.example.com. via relay...
050 220 gonzo.example.com ESMTP Postfix
050 >>> EHLO kermit.example.com
050 250-gonzo.example.com
050 250-PIPELINING
050 250-SIZE 10240000
050 250-VRFY
050 250-ETRN
050 250-STARTTLS
050 250 8BITMIME
050 >>> STARTTLS
050 220 Ready to start TLS
050 >>> EHLO kermit.example.com
050 250-gonzo.example.com
050 250-PIPELINING
050 250-SIZE 10240000
050 250-VRFY
050 250-ETRN 
050 250-AUTH LOGIN PLAIN
050 250-AUTH=LOGIN PLAIN
050 250 8BITMIME
050 >>> MAIL From:<badger at example.com> SIZE=321
050 250 Ok
050 >>> RCPT To:<badger at example.com>
050 >>> DATA
050 250 Ok
050 354 End data with <CR><LF>.<CR><LF>
050 >>> .
050 250 Ok: queued as 7DBD7C994 
050 <badger at kermit.example.com>... Sent (Ok: queued as 7DBD7C994)
250 2.0.0 k7VEWETT005146 Message accepted for delivery
badger... Sent (k7VEWETT005146 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 kermit.example.com closing connection


This is what the headers on the mail look like at the end.

   Return-Path: badger at example.com
   X-Original-To: badger at example.com
   Delivered-To: badger at example.com
   Received: from kermit.example.com (kermit.example.com [172.16.12.1])
           (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
           (No client certificate requested)
           by gonzo.example.com (Postfix) with ESMTP id 7DBD7C994
           for <badger at example.com>; Fri,  1 Sep 2006 00:37:40 +0900 (JST)
   Received: from kermit.example.com (localhost.localdomain [127.0.0.1])
           by kermit.example.com (8.13.7/8.13.7) with ESMTP id k7VEWETT005146
           for <badger at kermit.example.com>; Thu, 31 Aug 2006 15:32:14 +0100
   Received: (from badger at localhost)
           by kermit.example.com (8.13.7/8.13.7/Submit) id k7VEWERc005145
           for badger; Thu, 31 Aug 2006 15:32:14 +0100
   Date: Thu, 31 Aug 2006 15:32:14 +0100
   From: badger at example.com
   Message-Id: <200608311432.k7VEWERc005145 at kermit.example.com>
   To: badger at example.com
   Subject: test mail


Regards,

- badge




More information about the ILUG mailing list