sendmail and unqualified addresses

I have a solaris 10 server running sendmail 8.13.8, configuration file V10. On another server I am able to send local emails without appending a domain name but on this server I cannot. The mail does not bounce, the log file says they are sent, but they are not delivered. There isn't a problem with qualified names. I have added various entries for unqualified hosts, etc, without luck.

Anyone have an idea?

Thanks

is your domain set in resolv.conf?

Yes I do. The windows admin looked at the queue on the relay (exchange server) and it may be an issue there.

BUT

I am finding that all email (even that sent to root@ip.address) is being sent to the relay and not delivered locally.

In my configuration file I have

CL root

but when I send mail from the command line on the same machine, it sends it to the relay.

I would like to generate a new cf where local mail gets delivered locally, but outgoing mail gets relayed. This is a solaris 10 box.

THanks

Thanks

I entered this but the log file below show its going to the relay.

# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 cross
canonify input: cross
Canonify2 input: cross
Canonify2 returns: cross
canonify returns: cross
parse input: cross
Parse0 input: cross
Parse0 returns: cross
ParseLocal input: cross
ParseLocal returns: cross
Parse1 input: cross
Parse1 returns: $# local $: cross
parse returns: $# local $: cross
>

kristina# mail cross
test
test
kristina# tail /var/log/maillog

Jun 22 15:56:18 kristina sendmail[2113]: [ID 801593 mail.info] l5MJuI4X002113: from=root, size=110, class=0, nrcpts=1, msgid=<200706221956.l5MJuI4X002113@kristina.xxxx.com>, relay=root@localhost
Jun 22 15:56:18 kristina sendmail[2113]: [ID 801593 mail.info] l5MJuI4X002113: to=cross, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30110, relay=directencryptedroute.xxxx.com. [192.168.0.221], dsn=2.0.0, stat=Sent ( <200706221956.l5MJuI4X002113@kristina.xxxx.com> Queued mail for delivery)
kristina#

Do you have either

  1. mailhost set in /etc/hosts
  2. smartrelay set in sendmail.cf
    To the address of your main mail server ?

I have all those things. I researched a bit more and found this.

When I first set up this server, I could not send mail out. I learned I had to set the mailhost in the submit.cf file, and that worked. Then what I found was that local email (ie) user@host.domain.com or even to root, was not longer being delivered.

I need to have all root mail delivered locally and mail addresses to user@host.domain.com delivered locally, but all other mail sent to the relay server. I also need all addresses that have no domain appended (ie) mailuser, sent to the relay as mailuser@domain.com (not mailuser@host.domain.com). Right now they are trying to be delivered locally, which I understand is the submit.cf behavior.

I do not want this server listening on port 25.

Any ideas?

Thanks

It almost impossible to make out what you have and have not configured, why not rename the cf files then copy the .cf files from a working server? You can then compare what is different.

I'm sorry for the confusion.

All I want is all mail (except root) sent to the relay. Also, if unqualified addresses are specified (those without a domain), send them to the relay. If the domain can be appended to the unqualified address, that would be nice.

I had already tried the .cf from the working server but with the latest version of sendmail using the submit.cf, local.cf and sendmail.cf, it is confusing on what to edit. I do a ps and grep for sendmail, and the config file specified is local.cf, but it seems the submit.cf gets read anyway.

If you have a submit.mc that can do this, I would appreciate it.

Thanks

The different cf files serve different purposes. I'll post something later to explain. Editing the cf files is not the "correct" way to configure sendmail.

Thank you very much because any help you can provide would be appreciated. I am using m4 to try and build my submit.cf to send mail, but nothing is working. Even with masquarading the domain, if I just send mail to user, it is appending @host.domain.com and the exchange server can't figure out what it is.

I just need all mail (except) root delivered to the relay. This is the mc for submit.cf and root mail still goes to the relay. Also my ps for sendmail says to use local.cf so what do I need to edit there to get this to work.

Thank you so much for anything you can do.

divert(0)dnl
divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
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]
dnl FEATURE(`msp', `[127.0.0.1]')dnl
MASQUERADE_AS(`domain.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`msp', `mailhost.domain.com')dnl
LOCAL_USER(`root')dnl
#

THANK YOU VERY MUCH

# ps -ef | grep sendmail
smmsp 1556 1 0 17:46:27 ? 0:00 /usr/lib/sendmail -Ac -q15m
smmsp 1555 1 0 17:46:27 ? 0:00 /usr/lib/sendmail -q15m -C /etc/mail/local.cf
root 1569 1563 0 17:52:48 pts/2 0:00 grep sendmail

I have made some progress. The submit.mc file listed here allows me to send mail out without a domain name, so (ie) cross was relayed to the remote server and delivered to my mailbox.

Now I need to get root mail delivered locally.

Sending mail to root (either at the command line or in a cron job), fails because it is try ing to send to the relay as root@domain.com and the exchange server doesn't know who that is. How can I get root to stay local.

This is my submit.mc and all mail is correctly relaying to the exchange server, and mail from root shows correctly as root@host.domain.com.

divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
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]
dnl FEATURE(`msp', `[127.0.0.1]')dnl
MASQUERADE_AS(`domain.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`msp', `mailhost.domain.com)dnl
EXPOSED_USER(`root')dnl
kristina#

This is my local.mc

divert(0)dnl
VERSIONID(`@(#)local.mc 1.1 (Sun) 08/01/06')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
DAEMON_OPTIONS(`Name=MSA4, Family=inet, Addr=127.0.0.1, Port=587, M=E')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

Again, thank you.