Tuesday, April 12, 2016

Mutt Integration With Abook in Mac OS X

This post assume that you already have Mutt running on your Mac OS X.

I choose Abook to manage my address book because it's very simple and suitable for my need.

If you don't have Abook yet, you can install it. I'm using MacPorts, so just execute this command:
$ sudo port install abook

And then, add these lines to your .muttrc config file:
set query_command = "abook --mutt-query '%s'"macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook" 
A little explanation for above script:
1. set query_command (pressing ctrl-t) on Mutt - Compose view, will execute abook to look for match address based on the few letter(s) you already type in.
2. pressing ctrl-a on Mutt, will execute abook to input manually
3. pressing shift-a (or A capital) on Mutt - Index view, will add the sender from any highlight email

Just save your .muttrc and reload the config on Mutt, and you're good to go :)

*full reference see here

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)