photo
Jordan Sissel
geek

Sat, 09 Aug 2003

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>
endif
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
mhbuild-compose-application/pgp-signature:

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.

Comments: 0 (view comments)
Tags:
Permalink: /geekery/53
posted at: 10:21


0 responses to 'mh fun, still.'


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment:


Search this site

Navigation

Metadata

Home About Resume My Code (SVN)

Articles

ARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work Efficiency

Projects

fex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scripts

Presentations

Yahoo! Hack Day '08 Yahoo! Hack Day '06 Unix Essentials Vi/Vim Essentials SSH Tunneling (Video)

Tag Cloud

Calendar

< August 2003 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      

Friends

BarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler Shields

Technorati