LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-30-2006, 04:27 PM   #1
theedge981
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Rep: Reputation: 0
sendmail not working after dead internet connection


All,

A few days ago I had a problem where my internet connection was down for a few days. I've got some crons that run several times per day that email me statistics about the machine (one at the end of the day which gives me a bandwidth summary, one that tells me if any partitions are approaching or above 90% capacity). The internet connection is working fine now, however none of my sendmail scripts are working anymore and it appears that the mail queue is filling up. This is what I see from ONE of several messages in 'mailq'

k3U403w02146 551 Sun Apr 30 00:00 Sysadmin@leins.homeip.net
(Deferred: Connection timed out with gsmtp163.google.com.)
theedge981@gmail.com

Does anyone have any idea why these messages aren't being processed and sent out? I tried a different (non gmail.com address) but got the same error. I was thinking that my ISP may have blocked port 25, but if that's the case how would I be able to tell and how can I change it so that sendmail sends through another port? I deleted everything in /var/spool/mqueue which purged all my old messages from last week when my connection was down, but now even new messages that get generated via cron aren't making it out. Anyone have any ideas?

Thanks,
Dan
 
Old 04-30-2006, 04:57 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Have you restarted sendmail and checked for error messages in /var/log/maillog, /var/log/messages or /var/log/syslog? Can you telnet directly to one of the recipient SMTP servers with something like telnet gsmtp163.google.com 25? Any more info that you can provide would be useful.
 
Old 04-30-2006, 07:27 PM   #3
theedge981
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Original Poster
Rep: Reputation: 0
I've restarted sendmail a number of times, manually as well as when I've restarted the machine itself. I haven't seen any strange errrors in my /var/log/mail folder except for the following (and even this error I'm not even sure is a big deal)..

From the /var/log/mail/warnings file...
Apr 30 20:08:50 leins sendmail[2491]: error: safesasl(/var/lib/sasl/sasl.db) failed: Group readable file

And the only errors I see in /var/log/mail/info are the similar in nature to the ones posted originally, that the connection has timed out.

I attempted to telnet into one of the mail servers I'm trying to contact ( gsmtp163.google.com 25) but couldn't get in. I tried from another computer at work, couldn't get in there either. I also tried to telnet into a different smtp server (I've tried to send stuff to my gmail address as well as a couple of others) but can't seem to get into any server I try. I can however telnet into localhost on port 25 and connect just fine.

Like I said I manually cleaned out the queue so nothing too old should be hung up in there, anyone have any thoughts?

Thanks!
 
Old 05-01-2006, 06:12 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The permissions on /var/lib/sasl/sasl.db should be reset to whatever they were prior to when you were having problems but that may not be the problem.

I can run the telnet command I posted earlier, so if you're unable to reach gsmtp163.google.com it may be a firewall problem. Have you changed the configuration lately? Also, do you have a mail client that you can configure to use your ISP's SMTP server? If that works it may be that sendmail needs to be configured to use the smarthost directive.
 
Old 05-02-2006, 02:45 PM   #5
theedge981
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Lightbulb Problem Resolved

All,

For anyone tracking this now or in the future, I've figured out the problem. My ISP had recently implemented a block on port 25 to prevent servers from relaying their own mail. This, coincidentally enough, took place during the week I was without an internet connection, so when I was able to get back online, I attributed the problem to a full queue or a corrupted sendmail.mc config. I changed my sendmail.mc file and uncommented the SMART_HOST section, and placed in the smtp server of my ISP. I also put my authentication information into the /etc/mail/access file, restarted the sendmail service and that solved the problem.

Good luck to anyone else who might have this problem. I ultimately stumbled onto the solution by successfully emailing someone with an email address within my ISP's domain. As long as I could email someone within the domain, I was ok, but anything outside the domain (gmail.com, aol.com, etc...), I couldn't even make contact with their smtp server. It's a pretty easy fix, for more info google "sendmail relay through ISP", took 2 mins to fix.

Dan
 
Old 06-09-2006, 11:16 PM   #6
willy
LQ Newbie
 
Registered: Apr 2006
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by theedge981
All,

For anyone tracking this now or in the future, I've figured out the problem. My ISP had recently implemented a block on port 25 to prevent servers from relaying their own mail. This, coincidentally enough, took place during the week I was without an internet connection, so when I was able to get back online, I attributed the problem to a full queue or a corrupted sendmail.mc config. I changed my sendmail.mc file and uncommented the SMART_HOST section, and placed in the smtp server of my ISP. I also put my authentication information into the /etc/mail/access file, restarted the sendmail service and that solved the problem.

Good luck to anyone else who might have this problem. I ultimately stumbled onto the solution by successfully emailing someone with an email address within my ISP's domain. As long as I could email someone within the domain, I was ok, but anything outside the domain (gmail.com, aol.com, etc...), I couldn't even make contact with their smtp server. It's a pretty easy fix, for more info google "sendmail relay through ISP", took 2 mins to fix.

Dan

Hi, can you email to me how to change or find the sendmail.mc file ??

I had the same problem with you. Please email to willy_gautamakal@yahoo.co.id

Thx very much
 
Old 06-13-2006, 11:58 PM   #7
theedge981
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by willy
Hi, can you email to me how to change or find the sendmail.mc file ??

I had the same problem with you. Please email to willy_gautamakal@yahoo.co.id

Thx very much

I'll post my reply here as well in case anyone else is seeking more info.

Regarding sendmail not working anymore...I modified the sendmail.mc file, which is located in /etc/mail. If your sendmail.mc file doesn't reside there, just do a `locate sendmail.mc` from a terminal and the location should come up.

Once you've found the file, add in a section like the following:

< define(`SMART_HOST',`smtp.echoes.net')

where smtp.echoes.net is the outgoing mail server of YOUR ISP. You can also add in a line:

< MASQUERADE_AS(`echoes.net')dnl

which will basically tack on the indicated domain name to any emails that get sent from your computer. For example if root were to send an email, you would see the sender listed as "root@echoes.net". Once again, put in your ISP's domain name. I believe this is optional.

Once you've done this, also in /etc/mail is a file called "access". Open it and add the following:

AuthInfo:smtp.echoes.net "U:username@echoes.net" "I:username@echoes.net" "Password" "M:LOGIN PLAIN"

username and password MUST be actual usernames and passwords set up through your ISP. You're basically telling your ISP's mail server who you are and that you are passing along a message you would like them to deliver for you. If you didn't have to use a username and password, anyone could relay whatever they wanted through that ISP's server.

Once you've added that, do the following:

`makemap hash /etc/mail/access.db < /etc/mail/access`

This will convert the text file you just modified into a database file.

Restart sendmail and you should be good to go. Hopefully ;-)

Dan
 
Old 12-02-2007, 02:06 PM   #8
trevisa
LQ Newbie
 
Registered: Dec 2007
Posts: 1

Rep: Reputation: 0
sendmail still not working

Quote:
Originally Posted by theedge981 View Post
I'll post my reply here as well in case anyone else is seeking more info.

Regarding sendmail not working anymore...I modified the sendmail.mc file, which is located in /etc/mail. If your sendmail.mc file doesn't reside there, just do a `locate sendmail.mc` from a terminal and the location should come up.

Once you've found the file, add in a section like the following:

< define(`SMART_HOST',`smtp.echoes.net')

where smtp.echoes.net is the outgoing mail server of YOUR ISP. You can also add in a line:

< MASQUERADE_AS(`echoes.net')dnl

which will basically tack on the indicated domain name to any emails that get sent from your computer. For example if root were to send an email, you would see the sender listed as "root@echoes.net". Once again, put in your ISP's domain name. I believe this is optional.

Once you've done this, also in /etc/mail is a file called "access". Open it and add the following:

AuthInfo:smtp.echoes.net "U:username@echoes.net" "I:username@echoes.net" "Password" "M:LOGIN PLAIN"

username and password MUST be actual usernames and passwords set up through your ISP. You're basically telling your ISP's mail server who you are and that you are passing along a message you would like them to deliver for you. If you didn't have to use a username and password, anyone could relay whatever they wanted through that ISP's server.

Once you've added that, do the following:

`makemap hash /etc/mail/access.db < /etc/mail/access`

This will convert the text file you just modified into a database file.

Restart sendmail and you should be good to go. Hopefully ;-)

Dan

I did all described above, but no success until now.
The best answer I get from my ISP is:

Running /var/spool/mqueue/lB2JTsgv003681 (sequence 1 of 9)
<felipe@construtoratrevisan.com.br>... Connecting to mx.construtoratrevisan.com.br. via esmtp...
220 hm704.hospedagemdesites.ws ESMTP
>>> EHLO asterisk1.local
250-hm704.hospedagemdesites.ws
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-PIPELINING
250 8BITMIME
>>> MAIL From:<atendimento@construtoratrevisan.com.br>
250 ok
>>> RCPT To:<felipe@construtoratrevisan.com.br>
>>> DATA
451 Please try again later
<felipe@construtoratrevisan.com.br>... Deferred: 451 Please try again later
503 RCPT first (#5.5.1)
>>> RSET
250 flushed

Running /var/spool/mqueue/lB2AYmE9012674 (sequence 2 of 9)
<root@asterisk1.local>... Connecting to asterisk1.local.consultoria. via esmtp...
<root@asterisk1.local>... Deferred: Connection refused by asterisk1.local.consultoria.

Running /var/spool/mqueue/lB2AYmEA012674 (sequence 3 of 9)
<root@asterisk1.local>... Deferred: Connection refused by asterisk1.local.consultoria.


I think something is wrong with my authentication information, and the relay host info.

Please help.

Tjanks,

Felipe
 
Old 12-03-2007, 12:26 AM   #9
Vijay Amirtharaj
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
Check the SPAM Block your ISP IP

Quote:
Originally Posted by theedge981 View Post
All,

A few days ago I had a problem where my internet connection was down for a few days. I've got some crons that run several times per day that email me statistics about the machine (one at the end of the day which gives me a bandwidth summary, one that tells me if any partitions are approaching or above 90% capacity). The internet connection is working fine now, however none of my sendmail scripts are working anymore and it appears that the mail queue is filling up. This is what I see from ONE of several messages in 'mailq'

k3U403w02146 551 Sun Apr 30 00:00 Sysadmin@leins.homeip.net
(Deferred: Connection timed out with gsmtp163.google.com.)
theedge981@gmail.com

Does anyone have any idea why these messages aren't being processed and sent out? I tried a different (non gmail.com address) but got the same error. I was thinking that my ISP may have blocked port 25, but if that's the case how would I be able to tell and how can I change it so that sendmail sends through another port? I deleted everything in /var/spool/mqueue which purged all my old messages from last week when my connection was down, but now even new messages that get generated via cron aren't making it out. Anyone have any ideas?

Thanks,
Dan
Hi,

I am not Master in Linux, but what I was faced the same problem I got rectified with the below solution.

Did you checked with your IP address for SPAM block, goto www.dnsstuff.com and enter your IP or domain for spam block check, if it so, please request for de-listing your IP from the SPAM Block site. And also pls check your \etc\hosts file for the IP Config. it should be in this order like this as i given here

127.0.0.1 localhost.localdomain localhost
your staticip yourlocalhost.yourdomain yourlocalhost

Then you restart your Mail Server and check, I hope you will not block by the SPAM.

I hope it would help in case you blocked by the Spam.

Vijay Amirtharaj
 
  


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
internet connection not working jojotx0 Fedora 5 02-24-2005 10:57 AM
Can not get Internet connection working New_To_RH_Linux Linux - Laptop and Netbook 15 02-22-2005 07:59 PM
Got my Internet Connection Working! jtwJGuevara LinuxQuestions.org Member Success Stories 0 03-25-2004 10:36 PM
Internet connection not working NoviceW Linux - Networking 1 01-31-2004 09:24 AM
Squid:2nd Browser access Internet SPEED dead becomes dead slow mwj Linux - Software 1 10-04-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:27 PM.

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
Open Source Consulting | Domain Registration