LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   commandline mail does not seem to work (https://www.linuxquestions.org/questions/linux-newbie-8/commandline-mail-does-not-seem-to-work-627407/)

okos 03-11-2008 10:27 PM

commandline mail does not seem to work
 
Hi
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:
Quote:

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 myemail@@gmail.com 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.

b1f30 03-12-2008 03:06 PM

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:

http://www.gentoo.org/doc/en/guide-to-mutt.xml

okos 03-12-2008 07:43 PM

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.

Quote:

-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


All times are GMT -5. The time now is 03:01 AM.