On Fri, Jan 11, 2002 at 10:01:46PM +0800, Charles Jie wrote:
> Thank you, Chris. I'm glad to see/use your script with my mutt. Please
> post it.

Several people have contacted me about the script I use for sending
receipts.  I decided just to post it here for anyone who wants it.
There's a couple of things to be aware of.  First, take a look at
the attached muttrc-changes.txt file.  There's a macro you need to
define.  Just in case it gets stripped off there's two CTRL-V/CTRL-M
characters in the macro.  One is immediately before the exclamation
mark and another just before the space at the end.  Change the path
in the macro to point to wherever you copy the muttrcpt.pl script.

The main script, muttrcpt.pl, is also attached.  I'm sure there's
some things you will need to change.  Probably the only thing you
need to be aware of is that the script examines the gcos field of
/etc/passwd.  At my site our Unix account names and our Exchange
Server account names do not match.  It's necessary for the script to
detect when it's looking at a message that was written by the
current user because you wouldn't want to send a receipt to
yourself.  I examine the gcos field to get the user's first and last
name.  You can probably strip this stuff out.

I hope this helps.  If you find errors or have any questions let me
know.

-- 
Chris          Linux is the answer.  Now, what was your question?
# Read receipts.  While there is no direct support in mutt for read
# receipts, it's possible to have this same functionality using an external
# script.  The following macro remaps the <return> key (1) to cat the message
# to a temporary file called /tmp/mutt.out and (2) to call muttrcpt to
# process /tmp/mutt.out and send a read-receipt if required.  NOTE:
# There should be CTRL-V/CTRL-M character before the exclamation
# mark and another before the space at the end of the macro.
macro index <return> '|cat > /tmp/mutt.out
!/home/gentlec/local/bin/muttrcpt.pl
 '

Attachment: muttrcpt.pl
Description: Perl program

Reply via email to