Skip to content

Addressbook ​

Adapted from the Jaromail manual source. Copyleft © 2010–2023 Denis Roio. GNU Free Documentation License 1.3 or later; full permission notice.

Addressbooks are the files storing the whitelist, the blacklist and optionally other custom lists of addresses. The format we use is native abook database files, by convention in $JAROMAILDIR/whitelist.abook and $JAROMAILDIR/blacklist.abook. More custom addressbooks can be used by specifying them using -l on the commandline, for instance -l family will query the $JAROMAILDIR/family.abook addressbook; when not used, whitelist is the default.

Addressbooks can be edited using a interactive console interface, for instance to add or delete entries by hand: use the abook command and optionally the -l option.

text
jaro abook

This will open the current whitelist for edit. To edit the blacklist add -l blacklist instead.

To quickly dump to the console all names and addresses in the Jaro Mail addressbook, one can use the list command

text
jaro list

To match a string across the addressbook, simply use the composite command addr followed by strings, for instance:

text
jaro addr dyne

will list all addresses containing 'dyne' in your whitelist.

Address lists ​

Jaro Mail handles lists of addresses as plain text files or streams with entries formatted as 'Name <email>' and newline terminated. This simple format conforms (or is normalized to) the RFC822 standard and UTF-8 charset encoding, both produced on stdout and read from stdin by various useful commands to take advantage of console piping.

Such lists of addresses are the output of the extract command, which is able to read the output of other commands and extract a list of email addresses found.

text
jaro search open source date:2w..  | jaro extract stdin

Will print to stdout the list of addresses found among the results of a search for open source through all the emails archived in the past 2 weeks.

text
jaro search date:1y.. and folder:known | jaro extract

Will print a sorted list of unique addresses found in the emails matching the search expression 'date:1y.. and folder:known', meaning all messages stored in the 'known' folder and not older than 1 year from now.

The import command is complementary to extraction: it reads an address list from stdin and imports it inside an addressbook specified using '-l' or a group list file provided as argument.

text
jaro search folder:unsorted | jaro extract | jaro import -l blacklist

Will extract all addresses found in unsorted (the maildir collecting all non-mailinglist emails in which we are not an explicit recipient) and put them into our blacklist.

Private recipient groups ​

You can define reusable local recipient lists in Mail/Groups/ and send to them by using the pseudo-address groupname@jaromail.group.

Create a group file, for example Mail/Groups/team, with one recipient per line:

text
#mode individual
Alice <alice@example.org>
Bob <bob@example.org>

Blank lines and comments are ignored. Recipients may be written either as bare addresses or as display names with addresses in angle brackets. Duplicate addresses are removed case-insensitively. If any non-comment line does not contain a valid email address, the message is not queued and is moved to postponed.

Then compose to the group:

text
jaro compose team@jaromail.group

Group delivery modes are controlled by the first line:

  • #mode individual (default): one message per recipient, recipients do not see each other.
  • #mode carboncopy or #mode cc: one message with all recipients in To: and Reply-To: set to sender address.
  • #mode bcc: one message with hidden recipients (To: undisclosed-recipients:;) and all recipients in Bcc:.

This behavior is implemented in the queueing path, so it also applies when messages are piped and queued from stdin.

Export to VCard and other formats ​

VCard is an exchange format useful to interface with other addressbook software and mobile phones, as well with spyware as Google and Apple mail. Jaro Mail supports converting address lists to a variety of formats thanks to abook:

text
jaro addr | jaro export vcard

Will take the list of addresses in whitelist and convert it to the vcard format on stdout, ready to be redirected to a file.

Here below a list of output formats supported as argument to export:

FormatDescription
abookabook native format
ldifldif / Netscape addressbook (.4ld)
vcardvCard 2 file
muttmutt alias
muttqmutt query format (internal use)
htmlhtml document
pinepine addressbook
csvcomma separated values
allcsvcomma separated values (all fields)
palmcsvPalm comma separated values
elmelm alias
textplain text
wlWanderlust address book
spruceSpruce address book
bsdcalBSD calendar
customCustom format

Of course export works with any list of addresses from stdin, for instance the result of extract operations on search queries, so that multiple commands can be concatenated.

Addressbook in brief ​

Here a roundup on the addressbook commands that are available from the jaro commandline script. Arguments '-l abook' take the string to identify

CommandArgumentsFunction (print on stdout, import from stdin)
abook-l listnameedit the addressbook (default whitelist)
addrsearch exprprint list of addresses matching expression
extractmaildirprint address list of all mails in maildir
extractgpg keyringprint address list of gpg public keyring
extractgpg pubkeyprint address list of gpg key signatures
extractvcard fileprint address list of entries in VCard file
import-l listnameimport address list from stdin to addressbook
exportformatconvert address list to a format (default vcard)