LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2004, 11:21 AM   #1
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Rep: Reputation: 0
Sendmail Help!


Hello,

I am new to this forum. However, I have a question that I have been trying to solve for several days now. I tried to search for the answer on google, but no matter where I go, I find different suggestions and nothing has seemed to work yet. I am a bit confused on this....

The question is dealing with sendmail. We use webmin and the command prompt to work on our Linux server (Red Hat Linux). Everything seems to be set up correctly. However, for some reason, our application through which we send mail from (using php), does not want to send out email to EXTERNAL addresses. I have no problem sending out email to internal addresses (meaning within our campus). However, if I try to send out an email to someone with an address at comcast or hotmail, the email gets stuck in the mail queue, with the error message: "deferred...no route to host." Is this an issue with relaying? Or perhaps I have sendmail.mc configured incorrectly? Could you please give me some suggestions of what can be done to fix this problem! This would be really appreciated!

Thanks!

Olga
 
Old 08-05-2004, 11:55 AM   #2
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Can you ping addresses outside your campus?
It seems like a routing problem. Have you specified the right standard gateway?
 
Old 08-05-2004, 12:18 PM   #3
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Original Poster
Rep: Reputation: 0
Actually, I can ping addresses outside my computer. I am able to access the internet overall. -I do have an IP address. Or do you mean pinging through sendmail? (How would I try this?) (I know that I can go to Start > Run > cmd > and ping an external address, like yahoo.com. This works by the way.)

Inside the sendmail.mc file, i have this option set: ('Smart_Host','mail.my.provider'). In other words, the relay server is listed: mail.my.provider. Could this be a problem with relaying?

Also, I have this option set: dn1 DAEMON_OPTIONS('Port=smtp, Addr = 127.0.0.1, Name=MTA')

-I thought perhaps this was where the problem was, since the IP address is only specified from 127.0.0.1 (our campus). However, when I changed this option to equal 0.0.0.0, the problem still exists. The mail, although I flushed it after this, still is in the outbox. (I compiled sendmail.cf and restarted sendmail after making the changes of course.)

First I thought perhaps the addresses have something wrong with them. However, I even tried a test email and tried to send out an email to one of MY external addresses. Sure enough, this email got stuck also in the outbox.


Any suggestions?

Thanks....

-Olga

Last edited by ccbtech1; 09-04-2004 at 03:03 PM.
 
Old 08-05-2004, 12:31 PM   #4
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Original Poster
Rep: Reputation: 0
Correction: I meant I can ping addresses outside the CAMPUS (wrote computer). I thought this may have been a routing issue... but when I contacted the ITS center for our campus, everything seems to be fine. It seems that this is only a Sendmail issue. Perhaps it is not configured properly... I started using sendmail quite recently and therefore, am very new to it. As a result, I am not sure what is causing this problem. Perhaps someone has experienced this problem before, with Sendmail?

Thanks,
Olga
 
Old 08-05-2004, 01:17 PM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
ccbtech1

This line has a few errors, not sure if you copied and pasted it
define('Smart_Host','mail.unf.edu')

Should look like
define(`SMART_HOST',`mail.unf.edu')

There is a subtle difference between ` and '

Also this line dn1 should be dnl
dn1 DAEMON_OPTIONS('Port=smtp, Addr = 127.0.0.1, Name=MTA')

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

Doing this allows Sendmail to listen on all available interfaces

Another observation is that perhaps mail.unf.edu will not allow relaying from your IP or domain, SMART_HOST defines where external mail is directed to

Pete
 
Old 08-05-2004, 01:26 PM   #6
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Original Poster
Rep: Reputation: 0
Hello Pete,

Thanks for the reply. I actually did not copy & paste the line(s). -I probably should have done that! But thanks for the corrections. I looked at sendmail.mc and it looks like I have this setup correctly:

(copied & pasted):

dnl define(`SMART_HOST',`mail.unf.edu')

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
~This line, however, does not have the dnl at the end. (I just noticed this.) So I will try this!

As far as sending email, the email is sent out from different addresses, through our ticketing system. Here is an example of a message that I have "stuck" in the outbox:

Tue, 3 Aug 2004 09:35:37 -0400 someone'semail@unf.edu someone'semail@aol.com 1 kB Deferred: mailin-04.mx.aol.com.: No route to host

I will change the above line & will let you guys know if this works!

Thanks for your help!

-Olga

Last edited by ccbtech1; 08-07-2004 at 11:34 AM.
 
Old 08-05-2004, 01:35 PM   #7
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Original Poster
Rep: Reputation: 0
Hello,

It's me again. (Sorry for all these postings.) Pete, you wrote this line in your previous posting:
"mail.unf.edu will not allow relaying..."

Do you know this can be fixed? In other words, how should sendmail be configured on a server, using relaying... ?

Thanks again...

-Olga
 
Old 08-05-2004, 04:17 PM   #8
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
Hi -Olga

I think you will find that your host name is the problem not Sendmail

I am pretty sure Sendmail will not send mail out to the internet unless it originates from a FQDN ( fully qualified domain name )

Which Linux distribution are you using ? the following is based on Redhat

At the command prompt type
Code:
]$ hostname
If the answer you get is localhost.localdomain then this is more than likely your problem

localhost.localdomain is not a FQDN in other words it will not resolve to a MX record via DNS but this is the host Sendmail is using or trying to

Take a look in /etc/hosts, again based on Redhat, probably looks like this

127.0.0.1 localhost.localdomain localhost

Try it this way this

127.0.0.1 unf.edu localhost.localdomain localhost

You will need to reboot to make the change take effect

I must warn you that this is only an educated guess so no guarantees given but now Sendmail should have a FQDN or host which will resolve

If everything looks OK then try sending your mail again, if not you can always change /etc/hosts back to the way it was

Hope this helps

Pete
 
Old 08-06-2004, 01:25 PM   #9
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Original Poster
Rep: Reputation: 0
Hey guys! Thanks for all your help! I finally got this issue resolved! Pete, the distribution that I am using is Red Hat. However, when I checked the setup at /etc/mail/local-host-names, everything seems to be setup correctly there. Also, when I typed the command 'hostname,' it looks like I do have a FQDN.

But I finally got the mail to send out to external addresses by playing with the options for Sendmail via Webmin. :-) (Webmin makes it a lot easier to configure Sendmail.) All I did was go into "Sendmail Options" and changed the first option "Send outgoing mail via host" FROM deliver directly,TO the name of our ISPs SMTP server. And sure enough, all stuck messages (and there were a lot) successfully sent out! I have sent some test emails and everything seems to be working now. So I guess this was basically a routing problem? For some reason the mail did not want to send via the host DIRECTLY and forwarding it via our ISPs SMTP server got it to work! I will continue to monitor this though.

Thanks guys!

-Olga
 
Old 08-30-2004, 02:48 AM   #10
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Can I ask what are the configs that you changed?

dnl define(`SMART_HOST',`smtp.your.provider')

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

/etc/hosts

webmin - "send outgoing via host"

Is that all?

btw, where do I find the messages that failed to send out?
 
Old 09-02-2004, 05:27 AM   #11
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Quote:
Originally posted by subaruwrx
Can I ask what are the configs that you changed?

dnl define(`SMART_HOST',`smtp.your.provider')

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

/etc/hosts

webmin - "send outgoing via host"

Is that all?

btw, where do I find the messages that failed to send out?
bump
 
Old 09-04-2004, 02:02 PM   #12
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Quote:
Originally posted by subaruwrx
Can I ask what are the configs that you changed?

dnl define(`SMART_HOST',`smtp.your.provider')

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

/etc/hosts

webmin - "send outgoing via host"

Is that all?

btw, where do I find the messages that failed to send out?
bump
 
Old 09-04-2004, 03:00 PM   #13
ccbtech1
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: Red Hat
Posts: 7

Original Poster
Rep: Reputation: 0
Hello user "subaruwrx,"

Sorry for the delayed reply. To answer your question, the messages that failed to send out via sendmail reside at the following path: /var/spool/mqueue

I believe that all users that have sendmail setup and configured, the mail queue always resides in this location. If there are messages there, then they have not been sent out yet. I checked the dates on mine and realized that mail to external addresses was not sending out for about 2-3 days. Therefore, I archived and zipped the messages and saved them in a different location. When I finally got the issue resolved, I placed these messages back into the mail queue and they were then successfully sent out (after restarting sendmail).

You are correct, the only thing that I changed was a "sendmail option." However, I did this via webmin. (Using webmin, there is a way to see if there are messages stuck in your mail queue also. From memory, I believe you go into Servers > Sendmail > & Outgoing Mail). (I currently do not have any of this opened, thus writing from memory.) The thing that fixed the problem was changing the first option (in "Sendmail Options") "Send outgoing mail via host" FROM: 'DELIVERY DIRECTLY' (through the host), TO: 'the name of our ISPS SMTP server' (in my case it was mail.your.provider). In other words, I realized that for some reason, mail was not sending out to external addresses DIRECTLY through the host. Forwarding it to our provider, however, succesfully sends out the messages.

At the moment, I am not sure of the route that one would take via command prompt, since I did this via webmin. When I look into it, I will let you know. In the mean time, I hope I have answered your question(s).
 
Old 09-05-2004, 01:10 AM   #14
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Thanks for the reply.

However, I was told by my friend that he did not configure is sendmail but hes still able to mail to his hotmail account using "mail user@hotmail.com".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail ignores my sendmail smarthost entry Paul_assheton Linux - General 1 03-17-2009 08:55 AM
FC4 and Sendmail - Cannot create sendmail.pem Balderayne Linux - Security 2 11-09-2005 03:55 PM
php+ sendmail no good - python + sendmail ok nephish Linux - Networking 1 10-07-2005 02:19 PM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 12:47 PM
sendmail (dont just ignore it 'cause its got sendmail in the subject :P) GnomeKing Linux - Networking 1 11-12-2001 10:57 PM


All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration