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

Re: How to send a return receipt



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday, October 12 at 03:06 PM, quoth David Champion:
>> Well, the first thing that springs to my mind is some sort of 
>> message-hook (since that's what triggers when you view a message).
>
> The difficulty with this approach is that you don't want to send an MDN 
> response any time you read the message, so you need to track whether the 
> message has ever been read and MDN-replied to.  You can do this with 
> formail -D, but that involves an external Message-ID cache, separate 
> from the message store, wherever that might be.

What? Poppycock. If the New flag is insufficient (and I would argue it 
*ought* to be sufficient), you can simply add a header to mark 
messages by manipulating the $editor variable. For example:

message-hook '~h Disposition-Notification-To: !~h X-Disposition-Sent:' 
'set my_pdecode=$pipe_decode; set my_editor=$editor; set 
editor="formail -a 'X-Disposition-Sent: yes'"; push 
"<pipe-message>send-mdn.sh<enter><edit><enter-command>set 
pipe_decode=$my_pdecode<enter><enter-command>set 
editor=$my_editor<enter>";'

Thus, any message that does not have an X-Disposition-Sent header is a 
message that you haven't sent a response to, and messages that DO have 
such a header won't trigger the macro.

The only thing that might muck with that hook is if using formail as 
the editor doesn't work (because it runs so quickly), in which case 
you'd have to wrap it in a one-line script.

> I suppose that's one reason that Werner chose to implement this as a 
> patch instead of as a set of macros/script(s).  But it might not be 
> compelling for everyone.

I think the reason he did it was because of convenience.

> The patch certainly provides better functionality than hooks, 
> macros, and scripts do, given the usual constraints.

I don't see what that missing functionality might be. Maybe I'm 
missing something.

~Kyle
- -- 
Nonsense. Space is blue and birds fly through it.
                                                          -- Heisenberg
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFHEBK2BkIOoMqOI14RAlAaAJ9mOsCYoQSKb4jtzMGtMPfDMnKLngCg5i4U
ooTY65Ks0t46vCic/us4au8=
=O7++
-----END PGP SIGNATURE-----