Mail going to wrong server

Mail going to wrong server

am 27.11.2007 19:21:01 von Rick Knight

I have 2 servers. One is a firewall and router. The other is Mail, WWW and
FTP. Two separate boxes. The firewall needs to be able to send messages,
warnings and the like, to my id and to the root account for my domain. I
have been able to do this in the past by running sendmail on the mail
server only. Now I can't get it to work. I've tried with and without
sendmail running on the firewall. With sendmail running on the firewall, I
get this output...

Nov 26 13:04:14 knight-fw sendmail[5034]: lAQL4E6n005034:
from=rick_knight, size=248, class=0, nrcpts=1,
msgid=<200711262104.lAQL4E6n005034@knight-fw.rlknight.com>,
relay=rick_knight@localhost

Nov 26 13:04:15 knight-fw sendmail[5034]: lAQL4E6n005034:
to=root@rlknight.com, ctladdr=rick_knight (1000/100), delay=00:00:01,
xdelay=00:00:01, mailer=relay, pri=30248, relay=[127.0.0.1] [127.0.0.1],
dsn=2.0.0, stat=Sent (lAQL4E8d005035 Message accepted for delivery)

And the message is delivered to the my account on the firewall, not on the
mail server and I noticed this morning, some local mail is being sent to
the firewall and not to the mail server.

Without sendmail running I get this output...

Nov 27 09:46:44 knight-fw sendmail[7417]: lARHki7m007417: from=root,
size=243, class=0, nrcpts=1,
msgid=<200711271746.lARHki7m007417@knight-fw.rlknight.com>,
relay=root@localhost

Nov 27 09:46:44 knight-fw sendmail[7417]: lARHki7m007417:
to=catdad@rlknight.com, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30243, relay=[127.0.0.1] [127.0.0.1],
dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Neither way works now.

My firewall is running Sendmail 8.14.1 on Slackware 12 and vuurmuur 0.54.
My Mail server is running Sendmail 8.12.11 on Slackware 9.

I've tried changing localhost in submit.cf, but that made no difference.
I've also added SMART_HOST to the sendmail.cf, but again no change.

Can someone please tell me what I'm doing wrong?

Thanks,
Rick Knight

Re: Mail going to wrong server

am 29.11.2007 07:47:18 von Kees Theunissen

Rick Knight wrote:
> I have 2 servers. One is a firewall and router. The other is Mail, WWW and
> FTP. Two separate boxes. The firewall needs to be able to send messages,
> warnings and the like, to my id and to the root account for my domain. I
> have been able to do this in the past by running sendmail on the mail
> server only. Now I can't get it to work. I've tried with and without
> sendmail running on the firewall. With sendmail running on the firewall, I
> get this output...
>
> Nov 26 13:04:14 knight-fw sendmail[5034]: lAQL4E6n005034:
> from=rick_knight, size=248, class=0, nrcpts=1,
> msgid=<200711262104.lAQL4E6n005034@knight-fw.rlknight.com>,
> relay=rick_knight@localhost
>
> Nov 26 13:04:15 knight-fw sendmail[5034]: lAQL4E6n005034:
> to=root@rlknight.com, ctladdr=rick_knight (1000/100), delay=00:00:01,
> xdelay=00:00:01, mailer=relay, pri=30248, relay=[127.0.0.1] [127.0.0.1],
> dsn=2.0.0, stat=Sent (lAQL4E8d005035 Message accepted for delivery)
>
> And the message is delivered to the my account on the firewall, not on the
> mail server and I noticed this morning, some local mail is being sent to
> the firewall and not to the mail server.

[ snip (case without sendmail daemon running) ]

> My firewall is running Sendmail 8.14.1 on Slackware 12 and vuurmuur 0.54.
> My Mail server is running Sendmail 8.12.11 on Slackware 9.

From the above the host name of the firewall seems to be
knight-fw.rlknight.com. But a message to root@rlknight.com will be
delivered local. That means that somehow sendmail has been told to
consider rlknight.com to be a local destination.

Sendmail keeps a list of host names that are considered to be local.
In sendmail talk that list is called the "class w" and it contents
can be showed with the command: echo '$=w' | sendmail -bt
Please check that rlknight.com is included in the list.

Assuming that rlknight.com is included the next question will be
why it is included. And answering that question will give all the
information that is needed to remove the domain from the list.

The "class w" is populated by sendmail at startup with:
-- localhost
-- your host name and your fully qualified host name
(apparently knight-fw and knight-fw.rlknight.com in your case)
-- all IP numbers of the host included in square brackets (including
[127.0.0.1]).
-- all names obtained by a reverse lookup of all IP numbers of the
host (including lookups of 127.0.0.1)
This is most likely the cause of your problem. Inspect your name
server -if present- and the contents of your /etc/hosts file.
-- names directly specified in /etc/mail/sendmail.cf to be considered
local.
Unlikely; you would have known if you included such names.
Nevertheless look for lines starting with "Cw" (without the quote
chars) in /etc/mail/sendmail.cf
-- names included in files that are specified in /etc/mail/sendmail.cf
to supply "local host names"
Slackware 12.0 specifies, as most "default" sendmail installations
do, /etc/mail/local-host-names for that. Look for lines starting
with "Fw" (without the quote chars) in /etc/mail/sendmail.cf to
get a list of all files involved.
Inspect the contents of /etc/mail/local-host-names (assuming that
(only) /etc/mail/local-host-names is specified for this).

This should give you some background and directions for further
examination.
My first guess is that you included rlknight.com as an alias for your
host name in /etc/hosts.



Regards,

Kees.

--
Kees Theunissen.

Re: Mail going to wrong server

am 29.11.2007 19:36:37 von Rick Knight

On Thu, 29 Nov 2007 07:47:18 +0100, Kees Theunissen wrote:

> Rick Knight wrote:
>> [quoted text muted]
>
> [ snip (case without sendmail daemon running) ]
>
>> [quoted text muted]
>
> From the above the host name of the firewall seems to be
> knight-fw.rlknight.com. But a message to root@rlknight.com will be
> delivered local. That means that somehow sendmail has been told to
> consider rlknight.com to be a local destination.
>
> Sendmail keeps a list of host names that are considered to be local.
> In sendmail talk that list is called the "class w" and it contents
> can be showed with the command: echo '$=w' | sendmail -bt
> Please check that rlknight.com is included in the list.
>
> Assuming that rlknight.com is included the next question will be
> why it is included. And answering that question will give all the
> information that is needed to remove the domain from the list.
>
> The "class w" is populated by sendmail at startup with:
> -- localhost
> -- your host name and your fully qualified host name
> (apparently knight-fw and knight-fw.rlknight.com in your case)
> -- all IP numbers of the host included in square brackets (including
> [127.0.0.1]).
> -- all names obtained by a reverse lookup of all IP numbers of the
> host (including lookups of 127.0.0.1)
> This is most likely the cause of your problem. Inspect your name
> server -if present- and the contents of your /etc/hosts file.
> -- names directly specified in /etc/mail/sendmail.cf to be considered
> local.
> Unlikely; you would have known if you included such names.
> Nevertheless look for lines starting with "Cw" (without the quote
> chars) in /etc/mail/sendmail.cf
> -- names included in files that are specified in /etc/mail/sendmail.cf
> to supply "local host names"
> Slackware 12.0 specifies, as most "default" sendmail installations
> do, /etc/mail/local-host-names for that. Look for lines starting
> with "Fw" (without the quote chars) in /etc/mail/sendmail.cf to
> get a list of all files involved.
> Inspect the contents of /etc/mail/local-host-names (assuming that
> (only) /etc/mail/local-host-names is specified for this).
>
> This should give you some background and directions for further
> examination.
> My first guess is that you included rlknight.com as an alias for your
> host name in /etc/hosts.
>
>
>
> Regards,
>
> Kees.

Kees,

Thank you for the explanation. You were right. I had rlknight.com in
local-host-names. Not sure why I put it there, but when I removed it and
restarted sendmail, it worked. Thanks again for your help.

Rick