Dear mutts, I am seeking a technical solution to a PEBCAK¹ case routed in my inability — at times — to think before I do. ;)
¹) http://en.wikipedia.org/wiki/Pebcak Basically, I would like to instruct mutt to refuse sending a message when any one (or both) of two cases is true: a. a message is somehow marked as not-yet-ready b. a message is addressed to a "problematic correspondent" and does not include a manual signed-off sentinel of sorts. The furthest I got on my way to address (a) was to use send2-hook to manipulate $sendmail: http://git.madduck.net/v/etc/mutt.git/commitdiff/ea36eed7af5f5e0e28b8d60f55abda2997cb1a08 (also see http://bugs.debian.org/584264). I don't like this solution very much, because it abuses the recipient list; apparently, one can only use a limited number of patterns in a send2-hook, and using e.g. ~h yields the error: h: not supported in this mode http://www.mutt.org/doc/devel/manual.html#pattern-hook says: Mutt allows the use of the search pattern language for matching messages in hook commands. This works in exactly the same way as it would when limiting or searching the mailbox, except that you are restricted to those operators which match information Mutt extracts from the header of the message (i.e., from, to, cc, date, subject, etc.). It's a bit ironic that ~h is not usable in hooks, but so be it (see http://bugs.debian.org/585764). I am now turning to you because you might have better ideas. Can you think of a sentinel that is usable in hooks which a. matches if present, thus making the hook execute as long as it exists (e.g. X-Draft: yes)? b. matches unless present, thus making the hook execute until I add it (e.g. X-Signed-off: yes)? I was thinking of using X-Label, but that seems to get eaten (http://bugs.debian.org/583251). Ideally, the solution does not abuse the recipient list, the sender, or the subject. What would you do? -- martin | http://madduck.net/ | http://two.sentenc.es/ "montag, why do you burn books?" "it's a job like any other, pay is good and there is a lot of variety." -- ray bradbury (f451) spamtraps: madduck.bo...@madduck.net
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)