Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-11-2008, 11:27 PM   #1
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
commandline mail does not seem to work

I am having problems with the mail command. Either I am not able to send mail or I am not receiving. I am not sure which is the problem.

I followed the instructions here.

I tried to send mail to root and from root back to me respectively:
mail root -s test
mail me -s "test again"
I am not receiving the mail when I check the mail either as root or myself.

Ultimately I want to email myself /var/log/messages to address on a regular basis using logrotate.
Please see my other post regarding sending mail via smtp here.
That does not seem to work either.

I installed an updated version of mailutils and it still no changes. I believe mail and mailx is in the mailutils package.

I am able to read the man mail on my system so it must be installed. Root also has mail that was added on the slackware install.

And finally, I cannot find the mail.rc files. I searched my system and can't find it.

Last edited by okos; 03-11-2008 at 11:30 PM.
Old 03-12-2008, 04:06 PM   #2
Registered: Nov 2007
Location: GMT -5, who wants to know
Distribution: Gentoo, Debian, BSD, Slack
Posts: 119

Rep: Reputation: 15
The UNIX/Linux mail command is working fine. It's the other utilities you need in place to get the mail off your system and sent to wherever you want it to go.

A Gentoo example:
Old 03-12-2008, 08:43 PM   #3
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 38
I appreciate the response,
However I have a few questions.

ok... if mail will not work.
And fetchmail, smtp, mutt will work; how do I set logrotate to send mail through smtp?. Its default is mail -s.

-m, --mail <command>
Tells logrotate which command to use when mailing logs. This
command should accept two arguments: 1) the subject of the mes-
sage, and 2) the recipient. The command must then read a message
on standard input and mail it to the recipient. The default mail
command is /bin/mail -s.
Thanks okos


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 does not work acanton Debian 11 05-11-2008 01:56 PM
Disable commandline new mail notification fw12 Linux - General 2 11-28-2006 05:47 PM
Cannot get PHP mail() to work. jc materi Linux - Networking 4 01-19-2005 07:50 PM
mail -a would not work to send e-mail attachment saavik Linux - Networking 3 12-18-2003 10:33 AM does not work saravanan1979 Linux - Networking 8 02-01-2002 11:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:36 PM.

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