1

When replying to an email, Mutt inserts a line like this:

On $day $month, $sender wrote:

and puts the sender's mail below.

I'd like to change that, specifically I'd like to add the time of the sender's email.

Does Mutt offer a setting to do that?

4

Yes, the setting is attribution, which by default is

"On %d, %n wrote:"

There are a variety of substitutions available; %d is supposed to represent the date and time of the message you’re replying to. The format used for the date and time is determined by the date_format setting.

You can change these settings by editing your .muttrc:

set attribution="On %d, %n wrote:"
set date_format="!%a, %b %d, %Y at %I:%M:%S%p %Z"
| improve this answer | |
0

Based on Stephen Kitt's helpful answer I added this to my muttrc:

set attribution="On %[!%F at %T], %n (%a) wrote:"

Which produces a line like this in the reply:

On 2019-11-20 at 19:31:16, The Sender (sender@domain.com) wrote:

I first tried to set date_format using Mutt's hooks (reply-hook and folder-hook) in order to use %d in both attribution and the index_format but still have different time formats for index and attribution. This worked until returning to the index from replying to a message: The index would now show the same time format as the attribution line in the message reply.

Since there doesn't seem to be a post-reply-hook or a hook that's executed when showing the index, I used the square brackets to format the date in the attribution setting, something I learned how to do here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.