LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2017, 01:37 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
How to get date and time in mailx reply


I am using mailx. When I reply to a message, I get the expect

SoAndSo wrote:

along with the original text with ">" prefixes, but I don't get the date. I used to get:

On thisDate SoAndSo wrote:

Right now, I'm copy/pasting the date into the reply message. How can I get this in my replied message? There is no $HOME/.mailrc. The /etc/nail.rc is:
Code:
set hold

set append

set ask

set crt

set dot

set keep

set emptybox

set indentprefix="> "

set quote

set sendcharsets=iso-8859-1,utf-8

set showname

set showto

set newmail=nopoll

set autocollapse

set markanswered

ignore received in-reply-to message-id references
ignore mime-version content-transfer-encoding

fwdretain subject date from to
 
Old 11-26-2017, 04:16 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
What's new that caused this change, I wonder?

I find this in the man page (emphasis mine):
Code:
       quote  If set, mailx starts a replying message with the original message prefixed  by  the
	      value of the variable indentprefix.  Normally, a heading consisting of `Fromheader-
	      field wrote:' is printed before the quotation.  If the string noheading is assigned
	      to the quote variable, this heading is omitted.  If the string headers is assigned,
	      the headers selected by the ignore/retain commands are printed  above  the  message
	      body,  thus quote acts like an automatic ~m command then.  If the string allheaders
	      is assigned, all headers are printed above the message body, and all MIME parts are
	      included, thus quote acts like an automatic ~M command then.
...so it looks like you're getting the default heading.

I'll leave it to you to figure out how to assign strings and select headers as defined in the second highlight.
 
Old 11-27-2017, 01:19 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
.~/mailrc I tried:
Code:
quote=headers
# and
quote=allheaders
# the following are and always have been set:
fwdretain To From Subject Date Organization
fwdignore Delivered-To
In both cases I pretty much got all headers -- not what I want. I've no idea what changed. Maybe I'm hallucinating about my recollection. I've spent enough time on this. I'll just manually add in the "On <date>" bit for now.
 
  


Reply

Tags
datetime, mailx, 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
how to convert windows date and time to unix date and time jitupatil_2007 General 8 03-31-2008 05:58 AM
0 reply threads wrong date stress_junkie LQ Suggestions & Feedback 4 09-22-2006 09:19 AM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
set reply to address on mailx hamish Linux - Newbie 3 05-31-2005 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:59 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