mailx help

Robert Moskowitz rgm at htt-consult.com
Tue Jan 21 06:47:03 UTC 2014


thanks Ed, making some headway, see below:

On 01/20/2014 10:37 PM, Ed Greshko wrote:
> On 01/21/14 14:16, Robert Moskowitz wrote:
>> using mailx to supposedly mail to myself with no sendmail.  cron is failing in the mailing and the message ends in dead.letter.
>>
>> So I mved dead.letter to d1.letter and tried:  "mailx -t -q d1.letter" (and had to issue a cntl-D) and got:
>>
>> No recipients specified
>> "/home/rgm/dead.letter" 41/879
>>
>> Here is the content of d1.letter.  Note that there is a 'To:' line but it seems mailx does not like it?
>>
>> From: "(Cron Daemon)" <rgm>
>> To: rgm
>> Subject: Cron <rgm at lx120e> rsync -tvz ftp.rfc-editor.org::rfcs/*.txt /home/common/ietf/rfcs
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=us-ascii
>> Content-Transfer-Encoding: 7bit
>>
>> skipping non-regular file "rfc-ref.txt"
>> RFCs_for_errata.txt
>> bcp-index.txt
>> fyi-index.txt
>> ien-index.txt
>> rfc-index-latest.txt
>> rfc-index.txt
>> rfc6940.txt
>> rfc7048.txt
>> rfc7078.txt
>> rfc7086.txt
>> rfc7094.txt
>> rfc7095.txt
>> rfc7096.txt
>> rfc7097.txt
>> rfc7098.txt
>> rfc7103.txt
>> rfc7105.txt
>> rfc7108.txt
>> rfc7111.txt
>> rfc7115.txt
>> rfcxx00.txt
>> std-index.txt
>>
>> sent 11,194 bytes  received 399,421 bytes  74,657.27 bytes/sec
>> total size is 365,871,233  speedup is 891.03
>>
>> =======================================
>>
>> The 'To:' comes from my line in /var/spool/cron/rgm
>>
>> MAILTO=rgm
>>
>>
> Not really an answer....  But, I found that
>
> cat d1.letter | mailx -t
>
> Will result in the mail being delivered.
>
Well you must have sendmail or equiv installed:

  cat d1.letter |mailx -t
Ignoring header field "MIME-Version: 1.0"
Ignoring header field "Content-Type: text/plain; charset=us-ascii"
Ignoring header field "Content-Transfer-Encoding: 7bit"
/usr/sbin/sendmail: No such file or directory
"/home/rgm/dead.letter" 37/741
. . . message not sent.

So it seems mailx cannot work even locally without sendmail, unlike what 
another poster here stated.

procmail was suggested by another poster here that works for local 
delivery without sendmail.  I may end up having to install it.




More information about the users mailing list