---
name: "meli"
section: "1"
platform: "linux"
package: "meli"
version: "0.8.11+dfsg-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/meli"
---

# meli(1)

terminal e-mail client μέλι is the Greek word for honey

## NAME

**meli** – terminal e-mail client *μέλι* is the Greek word for honey

## SYNOPSIS

**meli** \[**--help** \| **-h**\] \[**--version** \| **-v**\] \[**--config** *path*\]

- **--help** \| **-h**

  Show help message and exit.

- **--version** \| **-v**

  Show version and exit.

- **--config** *path*

  Start meli with given configuration file.

- **create-config** \[*path*\]

  Create configuration file in *path* if given, or at*$XDG\_CONFIG\_HOME/meli/config.toml* . If *path* is *-* the result is printed to the standard output stream.

- **test-config** \[*path*\]

  Test a configuration for syntax issues or missing options. The configuration is read from *path* if given, or from*$XDG\_CONFIG\_HOME/meli/config.toml* . If *path* is *-* the configuration is read from the standard input stream.

- **man** \[*page*\]

  Print documentation page and exit (Piping to a pager is recommended).

- **install-man** \[*path*\]

  Install manual pages to the first location provided by MANPATH or [manpath(1)](/manpath/1.md), unless you specify the directory as an argument.

- **compiled-with**

  Print compile time feature flags of this binary.

- **edit-config**

  Edit configuration files with EDITOR orVISUAL .

- **help**

  Prints help information or the help of the given subcommand(s).

- **print-app-directories**

  Print all directories that

  **meli** creates and uses.

- **print-config-path**

  Print location of configuration file that will be loaded on normal app startup.

- **print-default-theme**

  Print default theme keys and values in TOML syntax, to be used as a blueprint.

- **print-loaded-themes**

  Print all loaded themes in TOML syntax.

- **print-log-path**

  Print log file location.

- **view**

  View mail from input file.

## DESCRIPTION

**meli** is a terminal mail client aiming for extensive and user-friendly configurability.

```
     ^^      .-=-=-=-.  ^^
 ^^        (`-=-=-=-=-`)         ^^
         (`-=-=-=-=-=-=-`)  ^^         ^^
   ^^   (`-=-=-=-=-=-=-=-`)   ^^
       ( `-=-=-=-(@)-=-=-` )      ^^
       (`-=-=-=-=-=-=-=-=-`)  ^^
       (`-=-=-=-=-=-=-=-=-`)          ^^
       (`-=-=-=-=-=-=-=-=-`)
^^     (`-=-=-=-=-=-=-=-=-`)  ^^
   ^^   (`-=-=-=-=-=-=-=-`)          ^^
         (`-=-=-=-=-=-=-`)  ^^
  ^^       (`-=-=-=-=-`)
            `-=-=-=-=-`          ^^
```

## STARTING WITH meli

When launched for the first time, **meli** will search for its configuration directory,*$XDG\_CONFIG\_HOME/meli/* . If it doesn't exist, you will be asked if you want to create one and presented with a sample configuration file (*$XDG\_CONFIG\_HOME/meli/config.toml*) that includes the basic settings required for setting up accounts allowing you to copy and edit right away. See [meli.conf(5)](/meli.conf/5.md) for the available configuration options.

At any time, you may press ⟨?⟩  (*shortcuts.general.* *toggle\_help*) for a searchable list of all available actions and shortcuts, along with every possible setting and command that your version supports.

The main visual navigation tool, the left-side sidebar may be toggled with ⟨\`⟩(*shortcuts.listing.* *toggle\_menu\_visibility*) .

Each mailbox may be viewed in 4 modes:

- *Plain* views each mail individually,

- *Threaded* shows their thread relationship visually,

- *Conversations* collapses each thread of e-mails into a single entry,

- *Compact* shows one row per thread.

If you're using a light color palette in your terminal, you should set *theme* *=* *light* in the *terminal* section of your configuration. See [meli-themes(5)](/meli-themes/5.md) for complete documentation on user themes.

See [meli(7)](/meli/7.md) for a more detailed tutorial on using**meli** .

## SHORTCUTS

See [meli.conf(5)](/meli.conf/5.md) SHORTCUTS for shortcuts and their default values.

## VIEWING MAIL

Open attachments by typing their index in the attachments list and then ⟨a⟩(*shortcuts.envelope\_view.* *open\_attachment*) . **meli** will attempt to open text inside its pager, and other content via**xdg-open** . Press ⟨m⟩  (*shortcuts.envelope\_view.* *open\_mailcap*) instead to use the mailcap entry for the MIME type of the attachment, if any. See FILES for the location of the mailcap files and [mailcap(5)](/mailcap/5.md) for their syntax. You can save individual attachments with the following command:

**save-attachment** *INDEX* *path-to-file*

*INDEX* is the attachment's index in the listing.

- If the path provided is a directory, the attachment is saved with its filename set to the filename in the attachment, if any.

  - If the 0th index is provided, the entire message is saved.

  - If the path provided is a directory, the message is saved as an eml file with its filename set to the messages message-id.

  You can pipe individual attachments to binaries with the following command:

**pipe-attachment** *INDEX* *binary* *ARGS*

Example usage with the [less(1)](/less/1.md) pager:

pipe-attachment 0 less

If the binary does not wait for your input before exiting, you will probably not see its output since you will return back to the user interface immediately. You can write a wrapper script that pipes your binary's output to

```
less
```

or

```
less -r
```

if you want to preserve the ANSI escape codes in the pager's output.

## SEARCH

Each e-mail storage backend has a default search method assigned. *IMAP* uses the SEARCH command, *notmuch* uses libnotmuch and *Maildir/mbox* performs a slow linear search. It is advised to use a search backend on *Maildir/mbox* accounts.**meli** , if built with sqlite3, includes the ability to perform full text search on the following fields: *From*, *To*, *Cc*, *Bcc*, *In-Reply-To*, *References*, *Subject* and *Date*. The message body (in plain text human readable form) and the flags can also be queried. To enable sqlite3 indexing for an account set *search\_backend* to *sqlite3* in the configuration file and to create the sqlite3 index issue command:

**reindex** *ACCOUNT\_NAME*

To search in the message body type your keywords without any special formatting. To search in specific fields, prepend your search keyword with "field:" like so:

subject:helloooo or subject:"call for help" or "You remind me today of a small, Mexican chihuahua."

not ((from:unrealistic and (to:complex or not query )) or flags:seen,draft)

alladdresses:mailing@example.com and cc:me@example.com

Boolean operators are*or* , *and* and *not*( alias: *!*) String keywords with spaces must be quoted. Quotes should always be escaped.

### Important Notice about IMAP/JMAP

To prevent downloading all your messages from your IMAP/JMAP server, don't set *search\_backend* to*sqlite3* . **meli** will relay your queries to the IMAP server. Expect a delay between query and response. Sqlite3 on the contrary at reasonable mailbox sizes should have a non noticeable delay.

### QUERY ABNF SYNTAX

- query = "(" query ")" \| from \| to \| cc \| bcc \| message\_id \| in\_reply\_to \| references \| header \| all\_addresses \| subject \| flags \| has\_attachment \| query "or" query \| query "and" query \| not query

- not = "not" \| "!"

- has\_attachment = "has:attachment" \| "has:attachments"

- quoted = ALPHA / SP \*(ALPHA / DIGIT / SP)

- term = ALPHA \*(ALPHA / DIGIT) \| DQUOTE quoted DQUOTE

- tagname = term

- flagval = "passed" \| "replied" \| "seen" \| "read" \| "junk" \| "trash" \| "trashed" \| "draft" \| "flagged" \| tagname

- flagterm = flagval \| flagval "," flagterm

- flags = "flag:" flag \| "flags:" flag \| "tag:" flag \| "tags:" flag \| "is:" flag

- from = "from:" term

- to = "to:" term

- cc = "cc:" term

- bcc = "bcc:" term

- message\_id = "message-id:" term \| "msg-id:" term

- in\_reply\_to = "in-reply-to:" term

- references = "references:" term

- header = "header:" field\_name "," field\_value

- field\_name = term

- field\_value = term

- all\_addresses = "all-addresses:" term

- subject = "subject:" term

## FLAGS

**meli** supports the basic maildir flags: passed, replied, seen, trashed, draft and flagged. Flags can be searched with the‘flags:’ prefix in a search query, and can be modified by

**flag** **set** **FLAG**

and

**flag** **unset** **FLAG**

## TAGS

**meli** supports tagging in notmuch and IMAP/JMAP backends. Tags can be searched with the‘tags:’ or‘flags:’ prefix in a search query, and can be modified by

**tag** **add** **TAG**

and

**tag** **remove** **TAG**

(see[meli.conf(5)](/meli.conf/5.md) TAGS , settings **colors** and **ignore\_tags** for how to set tag colors and tag visibility)

## COMPOSING

### Opening the message Composer tab

To create a new mail message, press ⟨m⟩  (*shortcuts.listing.* *new\_mail*) while viewing a mailbox. To reply to a mail, press ⟨R⟩(*shortcuts.envelope\_view.* *reply*) . Both these actions open the mail composer view in a new tab.

### Editing text

- Edit the header fields by selecting with the arrow keys and pressing ⟨Enter⟩  (*shortcuts.general.* *focus\_in\_text\_field*) to enter *INSERT* mode and **Esc** key to exit.

- At any time you may press ⟨e⟩  (*shortcuts.composing.* *edit*) to launch your editor (see[meli.conf(5)](/meli.conf/5.md) COMPOSING , setting **editor\_command** for how to select which editor to launch).

- Your editor can be used in**meli** 's embed terminal emulator by setting **embed** to *true* in your composing settings( You can return to **meli** at any time by pressing ⟨Ctrl-Z⟩)

- When launched, your editor captures all input until it exits or stops.

- To stop your editor and return to **meli** press ⟨Ctrl-z⟩ and to resume editing press the **edit** command again.

### Attachments

Attachments may be handled with the**add-attachment** , **remove-attachment** commands (see below).

### Sending

Finally, pressing ⟨s⟩  (*shortcuts.composing.* *send\_mail*) will send your message according to your settings( see[meli.conf(5)](/meli.conf/5.md) COMPOSING , setting name **send\_mail**) . With no Draft or Sent mailbox, **meli** tries first saving mail in your INBOX and then at any other mailbox. On complete failure to save your draft or sent message it will be saved in your *tmp* directory instead and you will be notified of its location.

### Drafts

To save your draft without sending it, issue *COMMAND* **close** and select 'save as draft'.

To open a draft for further editing, select your draft in the mail listing and press**edit** .

## CONTACTS

**meli** supports three kinds of contact backends:

1. an internal format that gets saved under*$XDG\_DATA\_HOME/meli/account\_name/contacts* .

2. vCard files (v3, v4) through the **vcard\_folder** option in the account section. The path defined as **vcard\_folder** can hold multiple vCards per file. They are loaded read only.

3. a [mutt(1)](/mutt/1.md) compatible alias file in the option **mutt\_alias\_file**

See [meli.conf(5)](/meli.conf/5.md) ACCOUNTS for the complete account contact configuration values.

## MODES

- NORMAL

  is the default mode

- COMMAND

  commands are issued in *COMMAND* mode, by default started with ⟨:⟩  (*shortcuts.general.* *enter\_command\_mode*) and exited with ⟨Esc⟩ key.

- EMBED

  is the mode of the embed terminal emulator

- INSERT

  captures all input as text input, and is exited with **Esc** key.

## COMMAND

### Mail listing commands

- **set** *plain* \| *threaded* \| *compact* \| *conversations*

  set the way mailboxes are displayed

| | |
| --- | --- |
| **conversations** | shows one entry per thread |
| **compact** | shows one row per thread |
| **threaded** | shows threads as a tree structure |
| **plain** | shows one row per mail, regardless of threading |

- **sort** \[*subject* \| *date*\] *asc* \| *desc*

  sort mail listing

- **subsort** \[*subject* \| *date*\] *asc* \| *desc*

  sorts only the first level of replies.

- **go** *n*

  where *n* is a mailbox prefixed with the *n* number in the side menu for the current account

- **toggle** **thread\_snooze**

  don't issue notifications for thread under cursor in thread listing

- **search** *STRING*

  search mailbox with *STRING* query. Escape exits search results.

- **select** *STRING*

  select threads matching *STRING* query.

- **clear-selection**

  Clear current selection.

- **set** *seen* \| *unseen*

  Set seen status of message.

- **import** *FILEPATH* *MAILBOX\_PATH*

  Import mail from file into given mailbox.

- **copyto,** **moveto** *MAILBOX\_PATH*

  Copy or move to other mailbox.

- **copyto,** **moveto** *ACCOUNT* *MAILBOX\_PATH*

  Copy or move to another account's mailbox.

- **delete**

  Delete selected entries.

- **export-mbox** *FILEPATH*

  Export selected threads to mboxcl2 file.

- **create-mailbox** *ACCOUNT* *MAILBOX\_PATH*

  create mailbox with given path. Be careful with backends and separator sensitivity (eg IMAP)

- **subscribe-mailbox** *ACCOUNT* *MAILBOX\_PATH*

  subscribe to mailbox with given path

- **unsubscribe-mailbox** *ACCOUNT* *MAILBOX\_PATH*

  unsubscribe to mailbox with given path

- **rename-mailbox** *ACCOUNT* *MAILBOX\_PATH\_SRC* *MAILBOX\_PATH\_DEST*

  rename mailbox

- **delete-mailbox** *ACCOUNT* *MAILBOX\_PATH*

  deletes mailbox in the mail backend. This action is irreversible.

### Mail view commands

- **pipe** *EXECUTABLE* \[*ARGS*\]

  pipe pager contents to binary

- **filter** *EXECUTABLE* \[*ARGS*\]

  filter and display pager contents through command

- **filter**

  select a filter from **pager.named\_filters** configuration value( See [meli.conf(5)](/meli.conf/5.md) PAGER for its syntax)

- **list-post**

  post in list of viewed envelope

- **list-unsubscribe**

  unsubscribe automatically from list of viewed envelope

- **list-archive**

  open list archive with **xdg-open**

### Composing mail commands

- **mailto** *MAILTO\_ADDRESS*

  Opens a composer tab with initial values parsed from the mailto: address.

- **add-attachment** *PATH*

  in composer, add *PATH* as an attachment

- **add-attachment** **\<** *CMD* *ARGS*

  in composer, pipe *CMD* *ARGS* output into an attachment

- **add-attachment-file-picker**

  Launch command defined in the configuration value **file\_picker\_command** in [meli.conf(5)](/meli.conf/5.md) TERMINAL

- **add-attachment-file-picker** **\<** *CMD* *ARGS*

  Launch command*CMD* *ARGS* . The command should print file paths in stdout, separated by NUL bytes. Example usage with[fzf(1)](/fzf/1.md) :

  add-attachment-file-picker \< fzf --print0

- **remove-attachment** *INDEX*

  remove attachment with given index

- **toggle** **sign**

  toggle between signing and not signing this message. If the gpg invocation fails then the mail won't be sent. See [meli.conf(5)](/meli.conf/5.md) PGP for PGP configuration.

- **save-draft**

  saves a copy of the draft in the Draft folder

### Generic commands

- **open-in-tab**

  opens envelope view in new tab

- **close**

  closes closeable tabs

- **setenv** *KEY=VALUE*

  set environment variable *KEY* to *VALUE*

- **printenv** *KEY*

  print environment variable *KEY*

- **quit**

  Quits**meli** .

- **reload-config**

  Reloads configuration but only if account configuration is unchanged. Useful if you want to reload some settings without restarting**meli** .

- **manage-jobs**

  Inspect background jobs.

- **manage-mailboxes**

  Inspect all mailboxes of an account, subscribed or not. Pressing the ⟨Enter⟩  (*shortcuts.general.* *open\_entry*) shortcut allows you to rename, move, toggle subscription and delete the mailbox under the cursor.

## EXIT STATUS

**meli** exits with 0 on a successful run. Other exit statuses are:

- 1

  catchall for general errors

- 101

  process panic

## ENVIRONMENT

- EDITOR

  Specifies the editor to use

- MELI\_CONFIG

  Override the configuration file

- NO\_COLOR

  When defined (regardless of its value), prevents the addition of *ANSI* color. The configuration value **use\_color** overrides this.

## FILES

**meli** uses the following parts of the XDG standard:

- XDG\_CONFIG\_HOME

  defaults to *~/.config/*

- XDG\_CACHE\_HOME

  defaults to *~/.cache/*

and appropriates the following locations:

- *$XDG\_CONFIG\_HOME/meli/*

  User configuration directory

- *$XDG\_CONFIG\_HOME/meli/config.toml*

  User configuration file, see [meli.conf(5)](/meli.conf/5.md) for its syntax and values.

- *$XDG\_CACHE\_HOME/meli/\**

  Internal cached data used by meli.

- *$XDG\_DATA\_HOME/meli/\**

  Internal data used by meli.

- *$XDG\_DATA\_HOME/meli/meli.log*

  Operation log.

- */tmp/meli/\**

  Temporary files generated by**meli** .

Mailcap entries are searched for in the following files, in this order:

1. *$XDG\_CONFIG\_HOME/meli/mailcap*

2. *$XDG\_CONFIG\_HOME/.mailcap*

3. *$HOME/.mailcap*

4. */etc/mailcap*

5. */usr/etc/mailcap*

6. */usr/local/etc/mailcap*

## STANDARDS

- Waldo Bastian, Allison Karlitskaya, Lennart Poettering, and Johannes Löthberg, *XDG Base Directory Specification*, May 08, 2021, Version 0.8, https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html.

- Daniel J. Bernstein, *maildir*, 1995, https://cr.yp.to/proto/maildir.html.

- Dr. Nathaniel S. Borenstein, *RFC1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information*, Legacy, September 01, 1993, mailcap file, https://datatracker.ietf.org/doc/rfc1524/.

- Keith Moore, *RFC2047 MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text*, IETF, November 01, 1996, https://datatracker.ietf.org/doc/rfc2047/.

- Rens Troost, Steve Dorner, and Keith Moore, *RFC2183 Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field*, Legacy, August 01, 1997, https://datatracker.ietf.org/doc/rfc2183/.

- Joshua D. Baer and Grant Neufeld, *RFC2369 The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields*, Legacy, July 01, 1998, https://datatracker.ietf.org/doc/rfc2369/.

- Frank Dawson and Tim Howes, *RFC2426 vCard MIME Directory Profile*, IETF, September 01, 1998, vCard Version 3, https://datatracker.ietf.org/doc/rfc2426/.

- Tim Showalter, *RFC2971 IMAP4 ID extension*, IETF, October 01, 2000, https://datatracker.ietf.org/doc/rfc2971/.

- Thomas Roessler, Michael Elkins, Raph Levien, and Dave Del Torto, *RFC3156 MIME Security with OpenPGP*, IETF, August 01, 2001, https://datatracker.ietf.org/doc/rfc3156/.

- Keith Moore, *RFC3461 Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)*, IETF, January 23, 2003, https://datatracker.ietf.org/doc/rfc3461/.

- Mark Crispin, *RFC3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1*, IETF, March 18, 2003, https://datatracker.ietf.org/doc/rfc3501/.

- Randall Gellens, *RFC3676 The Text/Plain Format and DelSp Parameters*, IETF, February 19, 2004, https://datatracker.ietf.org/doc/rfc3676/.

- Alexey Melnikov, *RFC3691 Internet Message Access Protocol (IMAP) UNSELECT command*, IETF, February 20, 2004, https://datatracker.ietf.org/doc/rfc3691/.

- Clive Feather, *RFC3977 Network News Transfer Protocol (NNTP)*, IETF, October 26, 2006, https://datatracker.ietf.org/doc/rfc3977/.

- Kurt Zeilenga, *RFC4505 Anonymous Simple Authentication and Security Layer (SASL) Mechanism*, IETF, June 12, 2006, https://datatracker.ietf.org/doc/rfc4505/.

- Alexey Melnikov, *RFC4549 Synchronization Operations for Disconnected IMAP4 Clients*, IETF, June 16, 2006, https://datatracker.ietf.org/doc/rfc4549/.

- Kurt Zeilenga, *RFC4616 The PLAIN Simple Authentication and Security Layer (SASL) Mechanism*, IETF, August 31, 2006, https://datatracker.ietf.org/doc/rfc4616/.

- Rob Siemborski and Alexey Melnikov, *RFC4954 SMTP Service Extension for Authentication*, IETF, July 23, 2007, https://datatracker.ietf.org/doc/rfc4954/.

- Dr. John C. Klensin, *RFC5321 Simple Mail Transfer Protocol*, IETF, October 01, 2008, https://datatracker.ietf.org/doc/rfc5321/.

- Pete Resnick, *RFC5322 Internet Message Format*, IETF, October 01, 2008, https://datatracker.ietf.org/doc/rfc5322/.

- Julien ÉLIE, *RFC6048 Network News Transfer Protocol (NNTP) Additions to LIST Command*, IETF, November 22, 2010, https://datatracker.ietf.org/doc/rfc6048/.

- Dave Crocker, Dr. John C. Klensin, Dr. Marshall T. Rose, and Ned Freed, *RFC6152 SMTP Service Extension for 8-bit MIME Transport*, IETF, March 07, 2011, https://datatracker.ietf.org/doc/rfc6152/.

- Simon Perreault, *RFC6350 vCard Format Specification*, IETF, August 31, 2011, vCard Version 4, https://datatracker.ietf.org/doc/rfc6350/.

- Abel Yang, Shawn Steele, and Ned Freed, *RFC6532 Internationalized Email Headers*, IETF, February 17, 2012, https://datatracker.ietf.org/doc/rfc6532/.

- Cyrus Daboo, *RFC6868 Parameter Value Encoding in iCalendar and vCard*, IETF, February 14, 2013, https://datatracker.ietf.org/doc/rfc6868/.

- Alexey Melnikov and Dave Cridland, *RFC7162 IMAP Extensions: Quick Flag Changes Resynchronization (CONDSTORE) and Quick Mailbox Resynchronization (QRESYNC)*, IETF, May 23, 2014, https://datatracker.ietf.org/doc/rfc7162/.

- Neil Jenkins and Chris Newman, *RFC8620 The JSON Meta Application Protocol (JMAP)*, IETF, July 18, 2019, https://datatracker.ietf.org/doc/rfc8620/.

- Neil Jenkins and Chris Newman, *RFC8621 The JSON Meta Application Protocol (JMAP) for Mail*, IETF, August 08, 2019, https://datatracker.ietf.org/doc/rfc8621/.

## SEE ALSO

[meli.conf(5)](/meli.conf/5.md), [meli-themes(5)](/meli-themes/5.md), [meli(7)](/meli/7.md), [xdg-open(1)](/xdg-open/1.md), [mailcap(5)](/mailcap/5.md)

## AUTHORS

Copyright 2017–2024 Manos Pitsidianakis ⟨*manos@pitsidianak.is*⟩

Released under the GPL, version 3 or greater. This software carries no warranty of any kind.( See *COPYING* for full copyright and warranty notices.)

### Links

-

  *Website:* **https://meli-email.org**

-

  *Main git repository and issue tracker:* **https://git.meli-email.org/meli/meli**

-

  *Official read-only git mirror on codeberg.org:* **https://codeberg.org/meli/meli**

-

  *Official read-only git mirror on github.com:* **https://github.com/meli/meli**

-

  *meli crate on crates.io:* **https://crates.io/crates/meli**
