Operating System - HP-UX
1752777 Members
6526 Online
108789 Solutions
New Discussion юеВ

sendmail, smart host and local delivery

 
Doug O'Leary
Honored Contributor

sendmail, smart host and local delivery

Ok; this one's got me confused...

Most of my client systems are running sendmail ver 8.13.3. I have a smart host, masquerading, and a genericstable configured. I can't seem to get mail that *should* be delivered locally to be delivered locally.

Here's tdivehe m4 commands for the sendmail.cf:

divert(0)dnl
VERSIONID(`@(#)B11.23_LR generic-hpux10.mc 8.11 (Berkeley) 2001/07/16')
OSTYPE(hpux11)dnl
DOMAIN(generic)dnl
MASQUERADE_AS(`myclient.com')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`genericstable')dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Addr=127.0.0.1')dnl
define(`SMART_HOST',`mailhost.myclient.com')dnl
define(`_X400_UUCP_')dnl
define(`confTRY_NULL_MX_LIST',`T')dnl
define(`LUSER_RELAY',`name_of_luser_relay')dnl
define(`DATABASE_MAP_TYPE',`dbm')dnl
define(`_CLASS_U_')dnl
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(openmail)dnl
MAILER(uucp)dnl

And the submit.cf:

divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
MASQUERADE_AS(`myclient.com')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`genericstable')dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Addr=127.0.0.1')dnl
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl

In rule testing mode, sendmail says it's supposed to send locally:
> /parse oleary
Cracked address = $g
Parsing envelope recipient address
canonify input: oleary
Canonify2 input: oleary
Canonify2 returns: oleary
canonify returns: oleary
parse input: oleary
Parse0 input: oleary
Parse0 returns: oleary
ParseLocal input: oleary
ParseLocal returns: oleary
Parse1 input: oleary
Parse1 returns: $# local $: oleary
parse returns: $# local $: oleary
2 input: oleary
2 returns: oleary
EnvToL input: oleary
EnvToL returns: oleary
final input: oleary
final returns: oleary
mailer local, user oleary
> /parse root
Cracked address = $g
Parsing envelope recipient address
canonify input: root
Canonify2 input: root
Canonify2 returns: root
canonify returns: root
parse input: root
Parse0 input: root
Parse0 returns: root
ParseLocal input: root
ParseLocal returns: root
Parse1 input: root
Parse1 returns: $# local $: root
parse returns: $# local $: root
2 input: root
2 returns: root
EnvToL input: root
EnvToL returns: root
final input: root
final returns: root
mailer local, user root
>

Yet, when I actually send an email, it gets zapped off to the mailhost:

# sendmail -v oleary << eof
Subject: testing
eof
oleary... Connecting to [127.0.0.1] via relay...
220 mysystem.ndc.myclient.com ESMTP Sendmail @(#)Sendmail version 8.13.3 - Revision 1.003 - 05/24/2006/8.13.3; Fri, 9 Feb 2007 07:48:56 -0500 (EST)
>>> EHLO mysystem.ndc.myclient.com
250-mysystem.ndc.myclient.com Hello 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
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From: SIZE=23
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 ... Connecting to mailhost.myclient.com via relay...
050 220 ihrh1.emsr.myclient.com ESMTP Fri, 9 Feb 2007 06:48:56 -0600 (CST)
050 >>> EHLO mysystem.ndc.myclient.com
050 250-ihrh1.emsr.myclient.com Hello mysystem.ndc.myclient.com [135.3.14.149], pleased to meet you
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-8BITMIME
050 250-SIZE 10485760
050 250-DSN
050 250-ETRN
050 250-DELIVERBY
050 250 HELP
050 >>> MAIL From: SIZE=373
050 250 2.1.0 ... Sender ok
050 >>> RCPT To:
050 >>> DATA
050 250 2.1.5 ... Recipient ok
050 354 Enter mail, end with "." on a line by itself
050 >>> .
050 250 2.0.0 l19CmufU026357 Message accepted for delivery
050 ... Sent (l19CmufU026357 Message accepted for delivery)
250 2.0.0 l19Cmula006525 Message accepted for delivery
oleary... Sent (l19Cmula006525 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 mysystem.ndc.myclient.com closing connection

Does anyone have an idea what I'm doing wrong and what I can do to fix it?

Thanks.

Doug O'Leary


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: sendmail, smart host and local delivery

Shalom Doug,

What I see so far is the "enhanced" behavior I've seen with sendmail on Red Hat boxes.

The local system is:

Connecting to [127.0.0.1] via relay...

Then local host tries to process it further.

The message is being accepted. The next step is to look at the mail.log file on this system and the system that is referred to in the DS directive. At some point the mail is being rejected.

I suspect its the RELAY directive in the target server not permitting the relay in the access file or something more esoteric like sendmail checking for reverse dns and not finding it. Either way the answer should be in the DS servers log file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Doug O'Leary
Honored Contributor

Re: sendmail, smart host and local delivery

Hey;

Thanks for the response.

>>At some point the mail is being rejected.

I don't think that's the case.

>>> MAIL From: SIZE=23
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 ... Connecting to mailhost.myclient.com via relay...

The mail from shows the root account being rewritten via the genericstable... the next line, oleary@myclient.com *should* only say oleary from what I understand. The following line shows the sendmail on the system connecting to the smarthost which it shouldn't be doing at all for local delivery.

All that being said, the mail logs for that particular email are as follows:

# grep l19Cmula006525 /var/adm/syslog/mail.log
Feb 9 07:48:56 usildb34 sm-mta[6525]: l19Cmula006525: from=, size=373, class=0, nrcpts=1, msgid=<200702091248.l19Cmuxg006524@usildb34.ndc.myclient.com>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Feb 9 07:48:56 usildb34 sm-mta[6525]: l19Cmula006525: to=, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30373, relay=mailhost.myclient.com [135.1.218.53], dsn=2.0.0, stat=Sent (l19CmufU026357 Message accepted for delivery)
Feb 9 07:48:56 usildb34 sendmail[6524]: l19Cmuxg006524: to=oleary, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30023, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l19Cmula006525 Message accepted for delivery)

And, the email shows up in my outlook email box immediately thereafter...

I appreciate your taking a look at this.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html