Cannot send to local accounts

Cannot send to local accounts

am 03.10.2007 22:54:22 von john.jct

Hello,

I am having an issue on RedHat ES4 where I have the sendmail 8.13.1
daemon stopped, as I only intend on sending mail from this computer
and never receiving any. I have changed the submit.cf MTAHost line to
reflect the appropriate external mail server.

All mail bound for an external mail account sends fine. The problem
occurs when I try to send mail internally. Say for example I use the
following command:

[root@host] echo hello | mail john

When I execute this command, the mail does not send to the john
account, and ./clientmqueue shows the mail message in the queue. Now
the interesting part is that: mailq -Ac results in

/var/spool/clientmqueue is empty
Total requests: 0

Here is the maillog entry for when I try to send a message to a local
account:

Oct 3 15:24:22 sendmail[13716]: l93KOMuZ013716: from=root,
size=18, class=0, nrcpts=1,
msgid=<200710032024.l93KOMuZ013716@server.domain.com>,
relay=root@localhost
Oct 3 15:24:22 sendmail[13716]: l93KOMuZ013716: to=john,
ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30018, relay=[IP.ADDRESS] [IP.ADDRESS], dsn=5.7.1, stat=User
unknown
Oct 3 15:24:22 sendmail[13716]: l93KOMuZ013716:
l93KOMua013716: DSN: User unknown
Oct 3 15:24:23 sendmail[13716]: l93KOMua013716: to=root,
delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=31042,
relay=[IP.ADDRESS] [IP.ADDRESS], dsn=5.7.1, stat=User unknown
Oct 3 15:24:23 sendmail[13716]: l93KOMua013716:
l93KOMub013716: return to sender: User unknown
Oct 3 15:24:23 sendmail[13716]: l93KOMub013716:
to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=32066, relay=[IP.ADDRESS] [IP.ADDRESS], dsn=5.7.1, stat=User
unknown
Oct 3 15:24:23 sendmail[13716]: l93KOMua013716: Losing ./
qfl93KOMua013716: savemail panic
Oct 3 15:24:23 sendmail[13716]: l93KOMua013716:
SYSERR(root): savemail: cannot save rejected email anywhere

For the sake of privacy I replaced all sensitive data in the log with
the general term.

>From the log, it looks like sendmail is trying to resolve
john@server.domain.com from the MTAHost instead of resolving that name
locally first. Of course john@server.domain.com is not going to
resolve anywhere except locally on this server, because john is a
local account of this server. Is there a way to get it to try to
resolve locally before it forwards it to IP.ADDRESS?



What I ultimately want to do is to route all local root mail messages
to an external email address, but because mail that is sent to a local
account stays in ./clientmqueue, sendmail will never read the alias to
send it to the external address.

Does anyone know a way to leave the deamon disabled, but allow sending
of email to both local and external addresses? Is this even possible?

Thank you for your help.

--John

Re: Cannot send to local accounts

am 04.10.2007 00:55:51 von per

In article <1191444862.005568.285090@g4g2000hsf.googlegroups.com>
"john.jct" writes:
>
>Does anyone know a way to leave the deamon disabled, but allow sending
>of email to both local and external addresses? Is this even possible?

Almost everything is possible with sendmail, but what you ask for
requires a significant amount of work, goes against the current sendmail
architecture, and is entirely pointless. Just leave submit.mc/cf as
shipped, run the daemon listening on the loopback address only (actually
the default in most current Unix/Linux versions/distributions), and
configure your SMART_HOST in the .mc file used to build sendmail.cf,
like the docs tell you to.

--Per Hedeland
per@hedeland.org

Re: Cannot send to local accounts

am 04.10.2007 16:52:03 von john.jct

On Oct 3, 5:55 pm, p...@hedeland.org (Per Hedeland) wrote:
> In article <1191444862.005568.285...@g4g2000hsf.googlegroups.com>
>
> "john.jct" writes:
>
> >Does anyone know a way to leave the deamon disabled, but allow sending
> >of email to both local and external addresses? Is this even possible?
>
> Almost everything is possible with sendmail, but what you ask for
> requires a significant amount of work, goes against the current sendmail
> architecture, and is entirely pointless. Just leave submit.mc/cf as
> shipped, run the daemon listening on the loopback address only (actually
> the default in most current Unix/Linux versions/distributions), and
> configure your SMART_HOST in the .mc file used to build sendmail.cf,
> like the docs tell you to.
>
> --Per Hedeland
> p...@hedeland.org

Great. Thanks for the advice. I was trying to avoid running the
daemon at all, but having it listen to only the loopback (which was
the default) is not a problem. Everything is working well now.

Thanks,

--John