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

Re: address rewriting on reply



* On Fri, Dec 03, 2004 Frank Altpeter (frank@xxxxxxxxxxx) muttered:
> I'm getting emails sent with a sender adress that is not replyable, say
> "broken@xxxxxxxxxx".
> 
> So, when i reply, i send "To: broken@xxxxxxxxxx" which i need to be
> rewritten into "To: working@xxxxxxxxxx" - but it doesn't seem to be
> possible.
> 
> I've tried with a send-hook to remove the To: field with un_myhdr and set
> a new one with my_hdr, but this doesn't work.

reply-hook . 'set editor="default editor; unset edit_headers'
reply-hook '~f broken@xxxxxxxxxx' 'set editor=rewrite_broken.sh; \
            set edit_headers'

Where rewrite_broken.sh would be something like:
#!/bin/sh
sed s/broken@xxxxxxxxxx/working@xxxxxxxxxx/ $1 > temp.file
$EDITOR temp.file
mv temp.file $1

If you have edit_headers normally set you can leave out that part of
course.

HTH

Michael
-- 
NEVER RESPOND TO CRITICAL PRESS.  IT IS A GAME YOU CAN ONLY LOSE, AND IT
MAKES US LOOK BAD.
        -- Bruce Perens

GPG Key ID: 0xDC1A44DD