viewmail-info
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [VM] vm-pcrisis configuration using vmpc-substitute-replied-header


From: Konrad Hinsen
Subject: Re: [VM] vm-pcrisis configuration using vmpc-substitute-replied-header
Date: Thu, 29 Dec 2011 21:56:14 +0100

Uday Reddy writes:

 > > Does anyone have a working configuration for vm-pcrisis that uses
 > > vmpc-substitute-replied-header? I tried the example action from the
 > > manual:
 > > 
 > >   (vmpc-substitute-replied-header "To" "From")
 > 
 > this code is backwards.  You want 
 > 
 >     (vmpc-substitute-replied-header "From" "To")

Oops, right, that way it works. I was being lazy and blindly copied an
example from the manual, instead of reading the documentation. It's probably a 
good idea to fix that example under "2.3 vmpc-actions":

   Only under certain conditions do we want to set our To: field to the
   contents of the From: field in the replied message.  The action to do
   this would look like this:

        ("set To to From"
          (vmpc-substitute-replied-header "To" "From"))

 > your response.  I believe it does work.  But the reason it is useless is
 > that if a message was sent from Mike to John and copied to you, and you
 > respond to it using this action, VMPC will use John as the "From" address in
 > your reponse.  That would be a fine way to irritate John!

Indeed. As I just found out, another weakness of
vmpc-substitute-replied-header is that it happily transforms a To line
with multiple addresses into a From line with multiple addresses.

I'd say the correct behaviour would be to grab all addresses from the
To and CC fields in the original messages and keep only those that
pass a user-supplied predicate for "one of my addresses". In most
cases only one address would be left and would be the candidate for
the From field. If there is more than one matching address, some user
intervention looks inevitable.

Well, this sounds like a nice programming exercice :-)

Konrad.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]