On Sun, Jun 13, 2010 at 07:57:23PM +0200, martin f krafft wrote: > Dear mutts, > > [snip] > > 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). > > [snip] > > 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?
Hi, I think the securest solution would be to use a custom script as $sendmail which checks if a special header is present (like Really-Send: yes) and only pass the mail to the "real" sendmail if the header is present, otherwise exiting with code 1. If you combine it with additional checks you wouldn't have to add the header to every mail, which might get annoying otherwise. The major problem with this solution is the bug you mentioned above, that mails are added to $record even if $sendmail fails (Debian bug 584264). One way around that would be to let the custom script store the mails in $record. A special header (like My-Fcc: path/to/record) could be used to create a replacement for fcc-hooks (by using my_hdr in other hooks to set it), as fcc-hooks wouldn't work in this case. (This is a summary of a discussion in #mutt on Freenode about this problem). Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9
pgpLMRDyen6RL.pgp
Description: PGP signature