Search this site





mh fun, still.

I'm still awake from last night, yadda yadda yadda.
So I got leet with my vim stuff and wrote a keymap that automatically generates an attached pgp signature. I should note, however, that you'll have to run mime from whatnow or run mhbuild yourself, before you send out your email.
" MH comp header/body separator
let g:mhseparator="---------"

if bufname(1) == '/u9/psionic/Mail/draft'
set tw=72
map \t :w<CR>1G:exec "/^" . g:mhseparator . "$"<CR>jyG:enew<CR>PGdd:w! ~/tmp/.draft<CR>:bn<CR>O#<text/plain<ESC>Go#<application/pgp-signature<ESC>:exec "r!gpg --detach-sign --no-secmem-warning --output - --armor --textmode ~/tmp/.draft"<CR>
This should be placed in your .vimrc. The only thing I'll really mention above is the g:mhseparator. This should be exactly the same line that separates your headers from your body (comp, repl, and forw formatting)
Just modify the variable in .vimrc to match your comp format.

One final note: To get the pgp signature mail part to play nice with mhbuild, you'll have to add this line to your .mh_profile

This just lets mhbuild know of the existance of Content-Type: application/pgp-signature.


So the other update is to my mailfilter script. It now supports better html stuffs and pgp signature verification. I've done a bit of testing with other people's pgp signature attachments (though not extensive) and trial runs verifying emails tagged by vim keymapping above. It seems to work pretty well.