LinuxQuestions.org
Visit Jeremy's Blog.
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 09-24-2008, 02:51 PM   #1
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Rep: Reputation: 15
Question "mail" command not working


I am trying to run a mail command from my Linux box and it does not seem to send any emails..

# mail -s Test xxxx@yahoo.com

There are no entried regarding any email attempt from teh box in /var/log messages...

What am I missing?

sendmail process is running ...

Last edited by jonty_11; 09-24-2008 at 03:02 PM.
 
Old 09-24-2008, 03:06 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
you need to send something, e.g. the empty file. Try,
Code:
mail -s Test someone@somewhere.com </dev/null
 
Old 09-24-2008, 03:22 PM   #3
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Berhanie View Post
you need to send something, e.g. the empty file. Try,
Code:
mail -s Test someone@somewhere.com </dev/null
Tried, no luck....

Infact my ealier attempt..I enter and then enter a message body..and then CTRL D to send message..

No luck either way...
 
Old 09-24-2008, 03:28 PM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You can check /var/spool/clientmqueue for the mail and read /var/log/maillog for any problems with sendmail.
 
Old 09-24-2008, 03:37 PM   #5
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Message accepted for delivery

Quote:
Originally Posted by Berhanie View Post
You can check /var/spool/clientmqueue for the mail and read /var/log/maillog for any problems with sendmail.
Interesting as per the maillog...
(m8OKKEEU027018 Message accepted for delivery)

But furthur it says timeouts..
sendmail[26973]: m8OK1rer026971: to=<xxxxx@yahoo.com>, ctladdr=<xxxx> (0/0), delay=00:38:01, xdelay=00:20:01, mailer=esmtp, pri=60342, relay=c.mx.mail.yahoo.com. [xxxxx], dsn=4.0.0, stat=Deferred: Connection timed out with c.mx.mail.yahoo.com.

Does my server need to have a valid email address to be able to send email out?

Last edited by jonty_11; 09-24-2008 at 03:43 PM.
 
Old 09-25-2008, 01:58 PM   #6
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Question Any ideas?

Quote:
Originally Posted by jonty_11 View Post
Interesting as per the maillog...
(m8OKKEEU027018 Message accepted for delivery)

But furthur it says timeouts..
sendmail[26973]: m8OK1rer026971: to=<xxxxx@yahoo.com>, ctladdr=<xxxx> (0/0), delay=00:38:01, xdelay=00:20:01, mailer=esmtp, pri=60342, relay=c.mx.mail.yahoo.com. [xxxxx], dsn=4.0.0, stat=Deferred: Connection timed out with c.mx.mail.yahoo.com.

Does my server need to have a valid email address to be able to send email out?
Following up..any ideas anyone?

Thx,

Last edited by jonty_11; 09-26-2008 at 11:27 AM.
 
Old 09-29-2008, 12:06 PM   #7
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by jonty_11 View Post
Following up..any ideas anyone?

Thx,

Am I not asking the question right or is this group really cold!!!
 
Old 09-29-2008, 02:03 PM   #8
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
No, we're just tired.

Quote:
Does my server need to have a valid email address to be able to send email out?
Probably. It depends on the kind of validation that's done on the receiving end.
But the error message you got indicates a connection problem. If the problem were
due to an invalid address, you'd get a rejection, instead.

You can try to see if you can connect to the yahoo server via telnet:
Code:
telnet <yahoo-mail-server> 25
Are you able to connect to any other mail servers?

If not, then it's possible that your ISP is blocking outgoing port 25.
If yes, then some filtering (possibly based on IP address) is happening.

Those are some ideas.
 
Old 09-30-2008, 01:32 AM   #9
jb_get
Member
 
Registered: Sep 2008
Location: America
Distribution: Debian
Posts: 33

Rep: Reputation: 16
It could very well be that you are being blocked by the ISP as they might not want you to run your own mail server. It happened to me. I eventually switched providers and everything was dandy.

Last edited by jb_get; 10-23-2008 at 02:52 AM.
 
Old 09-30-2008, 02:37 AM   #10
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,695
Blog Entries: 5

Rep: Reputation: 241Reputation: 241Reputation: 241
Quote:
Originally Posted by jonty_11 View Post
I am trying to run a mail command from my Linux box and it does not seem to send any emails..

# mail -s Test xxxx@yahoo.com

There are no entried regarding any email attempt from teh box in /var/log messages...

What am I missing?

sendmail process is running ...
you need to send your body
Code:
echo "body" | mail -s "test" xxx@yahoo.com
 
Old 10-01-2008, 10:52 AM   #11
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Blocking Mail!!!

Quote:
Originally Posted by jb_get View Post
It could very well be that you are being blocked by the ISP as they might not want you to run your own mail server. It happened to me. I eventually switched providers and everything was dandy.
OK, that makes sense, its comcast, I will call them and find out.

Telnet to yahoo mail server times out too

telnet 216.39.53.3 25
Trying 216.39.53.3...
telnet: connect to address 216.39.53.3: Connection timed out

Last edited by jonty_11; 10-01-2008 at 10:56 AM.
 
Old 10-01-2008, 11:00 AM   #12
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by jonty_11 View Post
OK, that makes sense, its comcast, I will call them and find out.

Telnet to yahoo mail server times out too

telnet 216.39.53.3 25
Trying 216.39.53.3...
telnet: connect to address 216.39.53.3: Connection timed out
Comcast said "use port 587 for sending mails out....

Do they block based on Dest Port or Source Port - not sure he didnt know...

Is there a way to change sendmail/smtp to use port 587?

Will that work?
 
Old 10-01-2008, 11:04 AM   #13
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You can solve this problem by relaying mail through your ISP's mail server.
With Sendmail, just set SMART_HOST to your ISP's outgoing server. You can Google for the proper way to do that.
 
Old 10-01-2008, 11:38 AM   #14
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by Berhanie View Post
You can solve this problem by relaying mail through your ISP's mail server.
With Sendmail, just set SMART_HOST to your ISP's outgoing server. You can Google for the proper way to do that.
Already looked..here is how to do it..
http://www.linuxha.com/other/sendmail/

But I get this error after doing all configs..
Plus I dont get this part?
Now edit the /etc/mail/genericsdomain file and add the entries you want changed, like this:

cookie!cookie!asterisk ncherry@linuxha.com

Now compile it into a db file:

# cd /etc/mail
# makemap -r hash genericstable.db < genericstable

Should I use genericstable or genericsdomain??? I dont have genericstable file and running above command complains about it....

ERROR is here:
Oct 1 10:34:10 fedoracore2uk sendmail[26554]: m91GYAOQ026554: from=<xxxxxxxx>, size=321, class=0, nrcpts=1, msgid=<200810011634.m91GY5KV026553@xxxxxxxx>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Oct 1 10:34:10 fedoracore2uk sendmail[26553]: m91GY5KV026553: to=xxxx@yahoo.com, ctladdr=xxxx(500/500), delay=00:00:05, xdelay=00:00:00, mailer=relay, pri=30014, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m91GYAOQ026554 Message accepted for delivery)
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client: file /etc/mail/certs/cert.pem unsafe: No such file or directory
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client: file /etc/mail/certs/key.pem unsafe: No such file or directory
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client: file /etc/mail/certs/cacert.pem unsafe: No such file or directory
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client, error: load verify locs /etc/mail/certs, /etc/mail/certs/cacert.pem failed: 0
Oct 1 10:34:11 fedoracore2uk sendmail[26556]: STARTTLS=client, relay=smtp.comcast.net, version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Oct 1 10:34:12 fedoracore2uk sendmail[26556]: m91GYAOQ026554: to=<xxxx@yahoo.com>, ctladdr=<xxxx> (500/500), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=30321, relay=smtp.comcast.net [76.96.62.117], dsn=5.0.0, stat=Service unavailable
Oct 1 10:34:12 fedoracore2uk sendmail[26556]: m91GYAOQ026554: m91GYCOQ026556: DSN: Service unavailable

Last edited by jonty_11; 10-01-2008 at 12:24 PM.
 
Old 10-08-2008, 04:37 PM   #15
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
Thumbs up Fixed by moving to Postfix

Quote:
Originally Posted by jonty_11 View Post
Already looked..here is how to do it..
http://www.linuxha.com/other/sendmail/

But I get this error after doing all configs..
Plus I dont get this part?
Now edit the /etc/mail/genericsdomain file and add the entries you want changed, like this:

cookie!cookie!asterisk ncherry@linuxha.com

Now compile it into a db file:

# cd /etc/mail
# makemap -r hash genericstable.db < genericstable

Should I use genericstable or genericsdomain??? I dont have genericstable file and running above command complains about it....

ERROR is here:
Oct 1 10:34:10 fedoracore2uk sendmail[26554]: m91GYAOQ026554: from=<xxxxxxxx>, size=321, class=0, nrcpts=1, msgid=<200810011634.m91GY5KV026553@xxxxxxxx>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Oct 1 10:34:10 fedoracore2uk sendmail[26553]: m91GY5KV026553: to=xxxx@yahoo.com, ctladdr=xxxx(500/500), delay=00:00:05, xdelay=00:00:00, mailer=relay, pri=30014, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m91GYAOQ026554 Message accepted for delivery)
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client: file /etc/mail/certs/cert.pem unsafe: No such file or directory
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client: file /etc/mail/certs/key.pem unsafe: No such file or directory
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client: file /etc/mail/certs/cacert.pem unsafe: No such file or directory
Oct 1 10:34:10 fedoracore2uk sendmail[26556]: STARTTLS=client, error: load verify locs /etc/mail/certs, /etc/mail/certs/cacert.pem failed: 0
Oct 1 10:34:11 fedoracore2uk sendmail[26556]: STARTTLS=client, relay=smtp.comcast.net, version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Oct 1 10:34:12 fedoracore2uk sendmail[26556]: m91GYAOQ026554: to=<xxxx@yahoo.com>, ctladdr=<xxxx> (500/500), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=30321, relay=smtp.comcast.net [76.96.62.117], dsn=5.0.0, stat=Service unavailable
Oct 1 10:34:12 fedoracore2uk sendmail[26556]: m91GYAOQ026554: m91GYCOQ026556: DSN: Service unavailable

Was able to get it all to work thru gmail instead of comcast and postfix sendmail
 
  


Reply

Tags
mail, sendmail


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
"mail" program not working to mail a user working at other host. stalin.varanasi Linux - Networking 5 09-16-2008 10:12 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Cannot send email using "mail" command. Madone_SL_5.5 Linux - Software 6 11-18-2006 03:22 PM
Sending mail with some attached files using "mail" command? zahadumy Linux - Software 3 05-27-2006 10:43 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration