I want to try and catch an error I often make, I assume that someone (or a mailing list) has an alias when it doesn't so I send a message to 'tin' for example when it should have been to 'tin-users'.
It's easy enough to catch the error because the To: address will be to my local domain rather than to the right place. So I can implement a send-hook matching 'zbmc.eu'. I virtually *never* send mail to anyone or anything at zbmc.eu so that's not a problem. However, having caught the error, I'm not quite sure how I can make the send-hook interactive. I want it to say "Did you really mean that?" and, if possible offer alternatives. If I just write an interactive shell script that gets called by the send-hook will it work as expected? How does mutt handle this, i.e. where will it put the interactions? The sequence will be something like:- Sending to 't...@zbmc.eu', did you really mean that? [answer 'n'] Did you mean 'tin-users@tin-org'? [answer 'y'] The script then tells mutt to change the To: address and all is well. If you answer 'n' to the second question it prompts for a new To: address. While I'm about it, how does one change the To: address from the send-hook script? -- Chris Green