cancel
Showing results for 
Search instead for 
Did you mean: 

mailx foo ">From"

SOLVED
Go to solution
jerry1
Super Advisor

mailx foo ">From"

I am trying to use mailx to send a message:

mailx -s "subjet"
Why does mailx add ">" to the word From if it
starts in colume 1 of the messagefile being
redirecting to mailx? The output of the
message is received like below. It's like it
is being treated as a from: line for smtp.
I tried to escape the From word. \From in the
original file but no go.

.
.
>From
.
.

9 REPLIES
Geoff Wild
Honored Contributor
Solution

Re: mailx foo ">From"

Can you post the contents of messagefile?

Thanks....Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
jerry1
Super Advisor

Re: mailx foo ">From"

Input file.

Line one or whatever.
From whatever
Two lines or whatever.


mailx -s "test" <

Output received:

Line one or whatever.
>From whatever
Two lines or whatever.




Geoff Wild
Honored Contributor

Re: mailx foo ">From"

Interesting - yet if you use from (instead of From)- then it doesn't...

Using sendmail do this:

Subject: Line one or whatever.
From: whatever
Data
Two lines or whatever.
.
.


sendmail -v USER
Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Charlie Rubeor
Frequent Advisor

Re: mailx foo ">From"

I actually ran into this problem before. I may be wrong, but I assumed that mailx was reading the "From" and confusing it with "From:"

Using elm solved the problem, as well as putting a blank line or a space before the "From" line.

So, either

elm -s "subjet" < messagefile

or change the messagefile to

Line one of messagefile
(blank line here)
From whatever
Another line of messagefile

hth.
jerry1
Super Advisor

Re: mailx foo ">From"

It seems to be only with mailx and
only if it is a cap F of the word "From".
jerry1
Super Advisor

Re: mailx foo ">From"

The only way to fix it seems to be by putting
a space before the From. Blank line before
does nothing.
Rita C Workman
Honored Contributor

Re: mailx foo ">From"

Curious...
have you tried doing it like:

mailx -r -s "subject" < messagefile

Just a thought,
Rita
Charlie Rubeor
Frequent Advisor

Re: mailx foo ">From"

I tried using the "-r" option, with no luck.

I believe that this is an hpux only issue, since the output from a linux server does not send the ">" character.

At least for me, it was not a big deal, since either using elm, inserting a space or changing to "FROM" worked fine.
Kiyoshi Miyake
Frequent Advisor

Re: mailx foo ">From"

hi,

"From" is separator of massage in mbox.
so, mail command changes "From" to ">From".

see also:
http://www.mail-archive.com/mutt-users@mutt.org/msg21898.html

thx.