<<< Date Index >>>     <<< Thread Index >>>

Re: Muttrc Attribution help



On 10/2/06, Gary Johnson <garyjohn@xxxxxxxxxxxxxxx> wrote:
On 2006-09-26, Chris Davis <davisfactor@xxxxxxxxx> wrote:
> Hi all,
>
> I'm setting up Mutt to work in an Outlook enviornment and I have a
> question on setting the attribution parameter.
>
> I would like my replies to look similar to Outlooks, like so:
>
> -----Original Message-----
> From: Sender's name
> Sent: Monday, September 25, 2006 11:10AM
> To: Recipient 1; Recipient 2 <recipient2@xxxxxxxxxxxxxx>; Recipient 3
> Cc: Recipient 4; Internal Group 1
> Subject: Subject line goes here
>
>
> Currently, my attribution line looks like this:
>
> set attribution="\n\n\n-----Original Message-----\nFrom: %f\nSent:
> %{%A, %B %d, %Y %I:%M %p}\nTo: %t\nSubject: %s \n"
>
> Which semi-works.
>
> The first problem is that it doesn't list any Cc: recipients.
> The second problem is that the To: field looks like this:  To: To Recipient
> 1
> The third problem is that it only lists the first recipient of the
> original email.
>
>
> Also, if this is possible, can we not include the <user@xxxxxxxxxx> in
> there if the domain.com is my domain?
>
> For example, if my domain is mydomain.com and someone else in the
> reply is yourdomain.com, then I would like the To: attribution to look
> like this:
> To: Recipient 1; Recipient 2 <recipient2@xxxxxxxxxxxxxx>
>
>
> This has been my biggest hurdle so far with moving from Outlook to
> Mutt and if anyone can help I would be very greatful.

There have been a couple of replies to this request that have
suggested that you forget Outlook's default reply format and just
use the "Internet standard" form.  That's a nice thought but totally
unrealistic in a large corporate environment.  I used to point out
to coworkers that they were violating e-mail standards or
conventions or just common sense when they did things like sending
meeting announcements as Word documents or even as PowerPoint
slides.  I've given up.  In an environment where nearly everyone
uses Outlook and hardly anyone exchanges e-mail with anyone outside
the company except other large corporate customers who are also
using Outlook, it just doesn't matter to anyone that what they send
can be read only on Windows.  The reply I often got was, "You
wouldn't have that problem with my e-mail if you were using
Outlook."

Part of this Outlook-centric mentality is the replying-to and
forwarding-of messages by including _everything_ in the message with
ones own comments at the top.  In a culture like that, it's much
more productive--and it's being considerate--to just follow suit.
If you think TOFU is hard to read, try reading a combination of TOFU
and "Internet-style" replies after a couple of rounds of exchanges.

Enough of my ranting and on to the solution.  I use the following
two macros:

----------------------------------------------------------------
# Turn Outlook-style replies on (,O) and off (,o).
#
macro index ,O  ':set   sig_on_top;set indent_string="";set header;set attribution="-----Original 
Message-----"<Return>' "set Outlook-style replies"
macro pager ,O  ':set   sig_on_top;set indent_string="";set header;set attribution="-----Original 
Message-----"<Return>' "set Outlook-style replies"
macro index ,o  ':unset sig_on_top;set indent_string="> ";unset header;set attribution="On 
%{%Y-%m-%d}, %f wrote:"<Return>' "set Internet-style replies"
macro pager ,o  ':unset sig_on_top;set indent_string="> ";unset header;set attribution="On 
%{%Y-%m-%d}, %f wrote:"<Return>' "set Internet-style replies"
----------------------------------------------------------------

I choose one or the other depending on the audience to whom I am
replying/forwarding and on any precedent already set in the message.

If I were to reply to your original message after executing the ,O
macro, it would appear like this when the editor opened, with the
cursor on the first line:

----------------------------------------------------------------

--
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA

-----Original Message-----
From: Chris Davis <davisfactor@xxxxxxxxx>
Subject: Muttrc Attribution help
Date: Tue, 26 Sep 2006 14:33:44 -0500
To: mutt-users@xxxxxxxx

 Hi all,

 ...

----------------------------------------------------------------

This isn't exactly what you wanted, since the headers are in a
different order, the Date line has "Date" rather than "Sent", and
the full addresses are shown even if they are in your domain, but I
think it captures the information and the spirit of the Outlook
reply format, which is close enough for me.  It does include all the
header fields not weeded out, so it can include the Cc: field and
all the addresses in the To: and Cc: fields.

One more thing.  When you forward a message with 'sig_on_top' set,
mutt does not insert a blank line between your signature and the
"----- Forwarded message from ... -----" line.  I "fixed" that
"problem" by patching send.c to add that line.  Without that patch,
you may want to add a "\n" to the start of the Outlook-style
attributions above.

HTH,
Gary

--
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA



Gary,

I was able to get pretty close thanks to your help.  I must have
typo'd your macro, but it turns out I don't really need it anyway
since there won't be very many times at all that I'll need to chose
between Outlook and non-Outlook-style replies.

I'm also able to structure the headers that are shown so I can place
them where I want.

Basically, this is what I've got:

--------------------------------
# Unorder the headers
unhdr_order

# Order the headers
hdr_order From: Date: To: Cc: Subject:

# Outlook uses Sent, instead of Date, but now I'm just being picky.

# Show the headers in replies  - I learned of this feature from your reply.
set header

# Set  the attribution
set attribution="\n\n\n-----Original Message-----"

--------------------------------------

And that's pretty much it.  I used to have the From: and Sent: headers
included in the attribution, but I can just use the headers parameter
and forget about the rest.  I still need to figure out how to remove a
lot of the stuff that's added when I forward a message, but I don't
forward that many emails so I can deal with it for now.  Maybe I'll
"patch" send.c and see if I can't remove that stuff myself.

Oh, and, like you said, I'm still seeing all email addresses beside
the recipients which is kind of annoying but I'll look into maybe
shortening it to just their names.

Thanks again for your help!

-chris