Re: Enabling mail program
- From: Derek Broughton <derek@xxxxxxxxxxxxxx>
- Date: Wed, 02 Sep 2009 21:53:19 -0300
Michael Satterwhite wrote:
On Tuesday 01 September 2009 11:05:00 am Chris G wrote:
On Tue, Sep 01, 2009 at 10:55:59AM -0500, Michael Satterwhite wrote:
I installed mailutils to enable command line email for scripts on my
system. As a test, I ran
mail -s "Test Message" michael@xxxxxxxxxxx < /dev/null
It seemed to run without error, but I never received the test
message. Obviously, I need to do something else to get the mail
working. Would someone be so kind as to let me in on the magic that I'm
By redirecting from /dev/null you sent yourself an empty message so it
doesn't seem to me to be very surprising that you received nothing.
Try redirecting from a text file of some sort.
Actually, if you execute the command it will tell you that it sent a
message with an empty body - which should have been received. There is no
requirement that a message have a body.
I'm pretty sure there is. It can be null, but the SMTP dialog requires
headers, a blank line, some number of lines (which can be zero) of text, and
a line containing only "." to terminate the body. "mail" expects that "."
and I wouldn't have been surprised that redirecting from /dev/null didn't
work, because it doesn't have that ".", but...
Regardless, I have tried it as well with a small text file. Same results.
So look at your syslog. It should be in there (this is masqmail, but other
MTAs should give something similar).
$ mail -s "test2" derek@localhost </dev/null
Null message body; hope that's ok
$ tail /var/log/syslog
Sep 2 21:48:47 morgen masqmail: 1Mj0VL-3jv-00 <= <derek@morgen> with
Sep 2 21:48:47 morgen masqmail: 1Mj0VL-3jv-00 => <derek@localhost>
Sep 2 21:48:47 morgen masqmail: 1Mj0VL-3jv-00 completed.
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users