LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sendmail- RH8.0- Looking for relay on localhost.com (https://www.linuxquestions.org/questions/linux-software-2/sendmail-rh8-0-looking-for-relay-on-localhost-com-39259/)

rawbear 12-24-2002 03:30 AM

Sendmail- RH8.0- Looking for relay on localhost.com
 
Installed RH8. When I tr to send mail, (using sendmail -v user@domain.com) the server is looking for "localhost.com" wich, of course, cannot be resolved. The /etc/host is there and references localhost (at 127.0.0.1, the default).

Any Idea?

DavidPhillips 12-24-2002 06:03 AM

maybe it's something to do with your domainname

this is what I see on mine, is that where you are seeing it?

Code:

sendmail -v david@hotmail.com
test 12345
.
david@hotmail.com... Connecting to localhost.mydomain.com. via relay...
.
220 slacker.mydomain.com ESMTP Sendmail 8.12.4/8.12.4; Tue, 24 Dec 2002 05:57:25 -0600
>>> EHLO slacker.mydomain.com
250-slacker.mydomain.com Hello IDENT:1000@localhost [127.0.0.1], pleased to meet you


rawbear 12-25-2002 09:22 AM

I get:

david@hotmail.com... Connecting to localhost.com. via relay...
I eventually get an error messages that the name does not exist.

My domain is defined. This server was running 7.2. Mail worked fine. I formatted a new hard disk using 8.0, and gave it the real host name of my domain. I can ping anywhere and the server is visible.

On the old server, I get:

rturenne99@hotmail.com... Connecting to mx1.hotmail.com. via esmtp...
220 mc5-f26.law1.hotmail.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.5600 ready at Wed, 25 Dec 2002 07:20:39 -0800

What changed between the two versions?

DavidPhillips 12-25-2002 09:27 AM

It must just be the sendmail.cf that's different

rawbear 12-25-2002 10:54 AM

Actually, sendmail.cf (although I modify .mc only) is the same on both systems. I will compare the .cf files and try to find what module is different.
'let you know.

DavidPhillips 12-25-2002 10:44 PM

I normally use postfix.

I just remembered that I did have trouble with my sendmail on slack 8.1, not sure if it's installed the same, but it sounds like the same problem

here's what I did

http://www.linuxquestions.org/questi...892#post182892

rawbear 12-25-2002 10:58 PM

I am now reinstalling RH8.0
I will try from a fresh install. If it still doesn't work, I will try postfix.
I can't beleive I'm the only one with this question!!! I have done the same install on two different computers in two different network environments!

rawbear 12-25-2002 11:03 PM

David, what is the content of linux.smtp.mc in your example in the link you posted?

DavidPhillips 12-25-2002 11:31 PM

Hey, I don't know how but the .mc files are gone.

the entire /cf/ folder is gone

I'm gonna open the package and get them back I guess.

Let you know in a few minutes

DavidPhillips 12-25-2002 11:35 PM

ok not much to it. Here it is
must be the always add domain line

Code:

include(`../m4/cf.m4')
VERSIONID(`linux for smtp-only setup')dnl
OSTYPE(linux)
FEATURE(always_add_domain)dnl
MAILER(local)dnl
MAILER(smtp)dnl


DavidPhillips 12-25-2002 11:39 PM

I remember now, I uninstalled the sendmail-cf package

:)

rawbear 12-26-2002 08:21 AM

After a fresh install I get:

Dec 26 09:13:25 localhost sendmail[942]: gBQEDPtG000942: from=root, size=58, class=0, nrcpts=1, msgid=<200212261413.gBQEDPtG000942@localhost.localdomain>, relay=root@localhost
Dec 26 09:13:25 localhost sendmail[944]: gBQEDPiS000944: from=<root@localhost.localdomain>, size=360, class=0, nrcpts=1, msgid=<200212261413.gBQEDPtG000942@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Dec 26 09:13:25 localhost sendmail[942]: gBQEDPtG000942: to=rawbear99@hotmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30051, relay=localhost.localdomain. [127.0.0.1], dsn=2.0.0, stat=Sent (gBQEDPiS000944 Message accepted for delivery)

but it sits in the mailq... It is still insisting on a relay through localhost. I guess it's the default for this version. Why won't it send directly to the destination address?

I will now try your little config file.

rawbear 12-26-2002 09:01 AM

I tried your little config. No change...
the mail sits in the mailq and eventualy I get a :"connection timed out with..."

But I can ping the receiving end. The DNS resolves.
???

DavidPhillips 12-26-2002 10:54 AM

yes, mine still says relay=localhost.mydomainname, but it sends the mail

rawbear 12-26-2002 11:00 AM

OK. Then I will starrt a new post and ask if ANYBODY has installed vanilla RH8.0 and was able to send mail...

brenne 01-31-2003 11:54 AM

Check your /etc/hosts. Had a similar problem where 127.0.0.1 was being mapped to the full hostname of the computer and hence to the computer's Internet-accessible address (not to 127.0.0.1 or localhost) and, since it isn't sendmail doesn't want to relay from outside hosts that connect, I believe this causes the problem.

My /etc/hosts first looked like this:

127.0.0.1 myhostname.com myhostname localhost.localdomain localhost

But when I changed it to

127.0.0.1 localhost.localdomain localhost
1.2.3.4 myhostname.com myhostname


where 1.2.3.4 is my IP address, things worked. See if this helps.

harrygraham 02-01-2003 07:35 PM

Sendmail problem
 
I got Sendmail to work on a dial-up connection, and with just localhost.localdomain, but it required some masquerading of the message headers. This is the file I used.


divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file. If you modify the file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work.
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`sendmail.mc - ee553@ncf.ca')

OSTYPE(linux)
define(`ALIAS_FILE',`/etc/aliases')
FEATURE(masquerade_envelope) FEATURE(genericstable, `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
define(`SMART_HOST',`smtp.ncf.carleton.ca')
define(`confTO_QUEUEWARN', `16h')
MAILER(local)
MAILER(smtp)



Yhe complete instructions are at:



http://www.sendmail.org/~ca/email/offline_mailing.html


It works great, except I'd like to have fetchmail start when the ppp connection starts. Any ideas as how to accomplish this?

Harry

rawbear 02-03-2003 10:20 PM

I finally opted for POSTFIX.

Got it to work after I allowed it to relay through my ISP's mail service.

I decided to use WEBMIN to configure it. 'Tools all of five minutes.

I will try to work on SENDMAIL later...

DavidPhillips 02-04-2003 08:41 PM

good choice

mpoje 03-06-2003 04:06 PM

Fixed Same "localhost.com" Problem
 
I had the same problem and was able to fix it by editting the /etc/resolv.conf to search my local domain:
--
nameserver 123.123.123.123
search mydomain.com
--

(I had inadvertantly put only "com" in as a placeholder when I was installing the OS and sendmail resolved it to localhost.com, !?)

hope this keeps someone else from pulling out all the hair that got me to this 'simple' fix.

rnturn 03-06-2003 06:33 PM

Quote:

Originally posted by rawbear
I finally opted for POSTFIX.

Got it to work after I allowed it to relay through my ISP's mail service.

I decided to use WEBMIN to configure it. 'Tools all of five minutes.

I will try to work on SENDMAIL later...

I had the same problem on a couple of RH8 system that use sendmail. There's a line near the bottom of sendmail.mc that reads:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

If you change this to read:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

you've effectively commented it out. Unless you do that mail stays stuck on the system.

You know, there was another thread about a week ago that involved this very same problem (no mail flowing and ``localhost.com'' showing up in the logs). The poster never did resolve it until he reinstalled the sendmail packages.

Apparently, Red Hat's making it easy for people to hose their mail setup.

razametal 04-26-2003 10:35 PM

Look at /etc/resolv.con

I had the same trouble, and add to the first line of /etc/resolv.conf

search mi-isp-name.com
nameserver mi-isp-dns-server
nameserver mi-isp-2nd-dns-server


Good luck.:D


All times are GMT -5. The time now is 11:09 AM.