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.
jaro abookThis 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
jaro listTo match a string across the addressbook, simply use the composite command addr followed by strings, for instance:
jaro addr dynewill 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.
jaro search open source date:2w.. | jaro extract stdinWill 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.
jaro search date:1y.. and folder:known | jaro extractWill 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.
jaro search folder:unsorted | jaro extract | jaro import -l blacklistWill 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:
#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:
jaro compose team@jaromail.groupGroup delivery modes are controlled by the first line:
#mode individual(default): one message per recipient, recipients do not see each other.#mode carboncopyor#mode cc: one message with all recipients inTo:andReply-To:set to sender address.#mode bcc: one message with hidden recipients (To: undisclosed-recipients:;) and all recipients inBcc:.
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:
jaro addr | jaro export vcardWill 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:
| Format | Description |
|---|---|
| abook | abook native format |
| ldif | ldif / Netscape addressbook (.4ld) |
| vcard | vCard 2 file |
| mutt | mutt alias |
| muttq | mutt query format (internal use) |
| html | html document |
| pine | pine addressbook |
| csv | comma separated values |
| allcsv | comma separated values (all fields) |
| palmcsv | Palm comma separated values |
| elm | elm alias |
| text | plain text |
| wl | Wanderlust address book |
| spruce | Spruce address book |
| bsdcal | BSD calendar |
| custom | Custom 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
| Command | Arguments | Function (print on stdout, import from stdin) |
|---|---|---|
| abook | -l listname | edit the addressbook (default whitelist) |
| addr | search expr | print list of addresses matching expression |
| extract | maildir | print address list of all mails in maildir |
| extract | gpg keyring | print address list of gpg public keyring |
| extract | gpg pubkey | print address list of gpg key signatures |
| extract | vcard file | print address list of entries in VCard file |
| import | -l listname | import address list from stdin to addressbook |
| export | format | convert address list to a format (default vcard) |