[jp] mutt aliases and jpilot address book

Colin Brough Colin.Brough at blueyonder.co.uk
Mon Jun 16 09:41:52 EDT 2003


On Mon, Jun 16, 2003 at 09:21:17AM -0400, David Williamson wrote:
> Has anyone done any work doing something along the lines of getting the
> jpilot address list's email addresses to be imported to the mutt aliases
> file?  I've used the sylpheed and have enjoyed having my Clie's list of
> email addresses handy but have moved to mutt for email and would like to
> have the same capability.

Something like:

    jpilot-dump +A'alias %f.%l %f %l <%p5>' -A | grep '@'

would get you some of the way there... Where there are e-mail
addresses in the jpilot address book (cruduly, which have an '@' in
them; assumption, no '@'s in names!) then an alias line like this will
be generated:

	alias FirstName.LastName    FirstName LastName <email at address.com>

If you dumped this into a file '.aliases_jpilot' and then included the
line:

	source .aliases_jpilot

in your .muttrc, you'd be away....

Problems arise if what is in the fields in jpilot won't dovetail into
mutt's alias format:

 - if there is no first or last name - you've then got a spare '.' in
   the alias which you probably don't want;

 - if there are two e-mail addresses in jpilot, then you get something
   like <address1 at somewhere.com, address2 at somewhere.com> which won't
   make much sense.

If you are able to control/keep consistent the data in jpilot, then
this may be enough.

Cheers

Colin

----------------------------------------------------------------------
Colin Brough                             Colin.Brough at blueyonder.co.uk



More information about the Jpilot mailing list