LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-25-2018, 01:19 PM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,963

Rep: Reputation: 271Reputation: 271Reputation: 271
New mail objects to header line beginning with >


There's a new mail (mailx, heirloom mail...). Sending messages to myself doesn't work.

I use:

Code:
 mailx -s subject -t RandomTroll < text
and get:

Quote:
mailx: Not a header line, skipping: text
mailx: Restoring deleted header lines
You have new mail in /var/spool/mail/RandomTroll
When I read my mail I get:

Quote:
mailx version v14.9.11. Type `?' for help
/var/spool/mail/RandomTroll: 1 message 1 new
mailx: Not a header line, skipping: '>From RandomTroll Sun Nov 25 12:00:04 2018'
mailx: Not a header line, skipping: '>From RandomTroll Sun Nov 25 12:00:04 2018'
mailx: Not a header line, skipping: '>From RandomTroll Sun Nov 25 12:00:04 2018'

There are new messages in the error message ring (denoted by ERROR)

The `errors' command manages this message ring
ERROR#
and find this in the header:


Quote:
>From RandomTroll Sun Nov 25 12:01:27 2018
I restored the previous package, 12.5. It sees the same thing but doesn't object. What's up? The example I use up top is in the man page
 
Old 11-25-2018, 02:06 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You don't need the -t option, unless the file text that you redirect to the mail command contains the needed fields To: Subject: etc.
From mail(x) manpage:
Quote:
-t The message to be sent is expected to contain a message header with `To:', `Cc:', or `Bcc:' fields giving its recipients. Recipients specified on the command line are ignored.
If you don't want that, use just:
Code:
mailx -s subject RandomTroll < text
 
Old 11-25-2018, 06:51 PM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,963

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by bathory View Post
You don't need the -t option
Omitting '-t' makes no difference. Besides, I usually use the features it supports. I tried to simplify my question. The problem is that sending mail any way I can includes a
Quote:
>From
line in the header, to which the new mail objects but no previous versions.
 
Old 11-26-2018, 04:21 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by RandomTroll View Post
Omitting '-t' makes no difference. Besides, I usually use the features it supports. I tried to simplify my question. The problem is that sending mail any way I can includes a line in the header, to which the new mail objects but no previous versions.
Sorry, but I cannot replicate this behavior with or without the "-t" option, neither with mailx-12.5 nor with the new s-nail-14.9.11.
 
1 members found this post helpful.
Old 11-26-2018, 10:38 AM   #5
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,963

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
If I change:
Quote:
O UnixFromLine=From $g $d
(the default) to:
Quote:
O UnixFromLine=""
in /etc/mail/sendmail.cf Then the problem line doesn't happen.
But I still have another problem: the subject is right-justified:

Quote:
mailx version v14.9.11. Type `?' for help
/var/spool/mail/RandomTroll: 1 message 1 new

N 1 RandomTroll@my.domain 2018-11-26 09:20 15/560 Unknown notify test
Later:
Which was fixed by adding a - to the %s field of the headline variable in $HOME/.mailrc. Why it didn't matter before, I don't know.

It doesn't show in this message, but on my 170-column display 'Unknown notify test' is on the right edge.

Last edited by RandomTroll; 11-26-2018 at 10:50 AM. Reason: Figured it out.
 
  


Reply



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
[SOLVED] sql: put "beginning of line" and "end of line" within a charset... masavini Programming 7 09-19-2012 08:03 AM
Perl question: delete line from text file with duplicate match at beginning of line mrealty Programming 7 04-01-2009 06:46 PM
LXer: From the End of the Beginning to the Beginning of the End LXer Syndicated Linux News 0 03-08-2009 12:12 AM
LXer: Java Data Objects and Service Data Objects in SOA LXer Syndicated Linux News 0 01-17-2009 06:10 AM
C++: intereferencing header files and Objects eantoranz Programming 9 12-20-2006 09:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:49 AM.

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