MELI.CONF(5) | File Formats Manual | MELI.CONF(5) |
meli.conf
—
configuration file for the meli(1)
terminal e-mail client
$XDG_CONFIG_HOME/meli/config.toml
Configuration for meli is written in TOML which has a few things to consider (quoting the specification):
0x09
) or
space
(0x20
).0x0A
) or
CRLF
(0x0D 0x0A
).Refer to TOML documentation for valid TOML syntax.
Though not part of TOML syntax,
meli.conf
can have nested configuration files by
using the following m4(1) include macro:
include("/path/to/file")
The top level sections of the configuration are:
An example configuration:
# Setting up a Maildir account [accounts.account-name] root_mailbox = "/path/to/root/folder" format = "Maildir" listing.index_style = "Compact" identity="email@example.com" subscribed_mailboxes = ["folder", "folder/Sent"] # or [ "*", ] for all mailboxes display_name = "Name" # Set mailbox-specific settings [accounts.account-name.mailboxes] "INBOX" = { alias="Inbox" } #inline table "drafts" = { alias="Drafts" } #inline table [accounts.account-name.mailboxes."foobar-devel"] # or a regular table ignore = true # don't show notifications for this mailbox # Setting up an mbox account [accounts.mbox] root_mailbox = "/var/mail/username" format = "mbox" listing.index_style = "Compact" identity="username@hostname.local" composing.send_mail = { hostname = "localhost", port = 25, auth = { type = "none" }, security = { type = "none" } } [pager] filter = "COLUMNS=72 /usr/local/bin/pygmentize -l email" html_filter = "w3m -I utf-8 -T text/html" [notifications] script = "notify-send" [composing] # required for sending e-mail send_mail = 'msmtp --read-recipients --read-envelope-from' #send_mail = { hostname = "smtp.example.com", port = 587, auth = { type = "auto", username = "user", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" } }, security = { type = "STARTTLS" } } editor_command = 'vim +/^$' [shortcuts] [shortcuts.composing] edit = 'e' [shortcuts.listing] new_mail = 'm' set_seen = 'n' [terminal] theme = "light"
Available options are listed below.
Default values are shown in parentheses.
root_mailbox
Stringdefault_mailbox
Stringformat
String [maildir mbox imap notmuch jmap]subscribed_mailboxes
[String,]identity
StringFrom
:
headers of outgoing mail.extra_identities
[String,]From
: header will be
adjusted to its value instead of the default identity.display_name
StringName
<email@example.com>
".read_only
booleanmanual_refresh
booleanlisting.refresh
).
(false)refresh_command
Stringlisting.refresh
)
(None)search_backend
Stringnone
" and
"sqlite3
". ("sqlite3")vcard_folder
Stringmutt_alias_file
Stringmailboxes
mailboxnotmuch is supported by loading the dynamic library libnotmuch. If its location is missing from your library paths, you must add it yourself. Alternatively, you can specify its path by using a setting.
notmuch mailboxes are virtual, since they are defined by
user-given notmuch queries. You must explicitly state the mailboxes you want
in the mailboxes
field and set the
query property to each of them. To create a tree
hierarchy with virtual mailboxes, define the parent
property to a mailbox as the name of the parent mailbox you have used in
your configuration.
Account properties:
root_mailbox
library_file_path
Pathquery
Stringparent
StringExample:
[accounts.notmuch] format = "notmuch" #library_file_path = "/opt/homebrew/lib/libnotmuch.5.dylib" ... [accounts.notmuch.mailboxes] "INBOX" = { query="tag:inbox", subscribe = true } "Drafts" = { query="tag:draft", subscribe = true } "Sent" = { query="from:username@example.com from:username2@example.com", subscribe = true } "Archives" = { query="tag:archived", subscribe = true } "Archives/2019" = { query="tag:archived date:01-2019..12-2019", parent="Archives", subscribe = true }
IMAP specific options are:
server_hostname
Stringserver_username
Stringserver_password
Stringserver_password_command
Stringserver_password
server_port
numberuse_starttls
boolean993
and
"use_starttls
" is unspecified, it
becomes false by default. (true)use_tls
booleandanger_accept_invalid_certs
booleanoffline_cache
booleanuse_idle
booleanuse_condstore
booleanuse_deflate
booleanuse_oauth2
booleanserver_password_command
which should return a base64-encoded OAUTH2 token ready
to be passed to IMAP. For help on setup with
Gmail, see Gmail section below.
(false)use_auth_anonymous
booleanuse_id
booleantimeout
integer0
seconds means there is no
timeout. (16)Gmail has non-standard IMAP behaviors that need to be worked around.
Option store_sent_mail
should be disabled
since Gmail auto-saves sent mail by its own.
To use OAUTH2, you must go through a process to
register your own private "application" with
Google that can use OAUTH2 tokens, and
set the option use_oauth2
as
‘true
’ in the account configuration
section. For convenience in the meli repository under the
contrib/ directory you can find a
python3
file named oauth2.py
to generate and request the
appropriate data to perform OAUTH2 authentication.
Steps:
oauth2.py
script as follows (after
adjusting binary paths and credentials):
python3 oauth2.py --user=xxx@gmail.com
--client_id=1038[...].apps.googleusercontent.com
--client_secret=VWFn8LIKAMC-MsjBMhJeOplZ --generate_oauth2_token
and follow the instructions. Note down the refresh token.
server_password_command
enter a command like
this (after adjusting binary paths and credentials):
TOKEN=$(python3 oauth2.py
--user=xxx@gmail.com --quiet
--client_id=1038[...].apps.googleusercontent.com
--client_secret=VWFn8LIKAMC-MsjBMhJeOplZ
--refresh_token=1/Yzm6MRy4q1xi7Dx2DuWXNgT6s37OrP_DW_IoyTum4YA)
&& python3 oauth2.py --user=xxx@gmail.com
--generate_oauth2_string --quiet --access_token=$TOKEN
Your account section should look like this:
[accounts."gmail"] root_mailbox = '[Gmail]' format = "imap" server_hostname='imap.gmail.com' server_username="username@gmail.com" use_oauth2 = true server_password_command = "TOKEN=$(py...th2_string --quiet --access_token=$TOKEN" server_port="993" listing.index_style = "Conversations" identity = "username@gmail.com" display_name = "Name Name" subscribed_mailboxes = ["*" ] composing.store_sent_mail = false composing.send_mail = { hostname = "smtp.gmail.com", port = 587, auth = { type = "xoauth2", token_command = "...", require_auth = true }, security = { type = "STARTTLS" } }
JMAP specific options
server_url
Stringserver_username
Stringserver_password
Stringserver_password_command
Stringserver_password
use_token
booleandanger_accept_invalid_certs
booleantimeout
integer0
seconds means there is no
timeout. (16)mbox specific options:
prefer_mbox_type
Stringmboxcl2
" format. If the preferred
format fails, the message is retried with mboxrd and then if it fails
again there is a recover attempt, which discards the invalid message.
Valid values
mailboxes
field and set the
path property to each of them. Example:
[accounts.mbox] format = "mbox" mailboxes."Python mailing list" = { path = "~/.mail/python.mbox", subscribe = true, autoload = true }
NNTP specific options
server_hostname
Stringserver_username
Stringserver_password
Stringrequire_auth
booleanuse_tls
booleanserver_port
numberdanger_accept_invalid_certs
booleanstore_flags_locally
booleantimeout
integer0
seconds means there is no
timeout. (16)You have to explicitly state the groups you want to see in the
mailboxes
field. Example:
[accounts.sicpm.mailboxes] "sic.all" = {}
To submit articles directly to the
NNTP server, you must set the special value
server_submission
in the send_mail
field. Example:
composing.send_mail = "server_submission"
alias
Stringautoload
booleancollapsed
booleansubscribe
booleanignore
booleanusage
booleanSent
", you must
explicitly set it.conf_override
boolean[accounts."imap.example.com".mailboxes] "INBOX" = { index_style = "plain" } "INBOX/Lists/devlist" = { autoload = false, pager = { filter = "pygmentize -l diff -f 256"} }
sort_order
unsigned integer[accounts."imap.example.com".mailboxes] "INBOX" = { index_style = "plain" } "INBOX/Sent" = { sort_order = 0 } "INBOX/Drafts" = { sort_order = 1 } "INBOX/Lists" = { sort_order = 2 }
encoding
StringDefault values are shown in parentheses.
send_mail
String|SmtpServerConf0
for success) or settings for an SMTP server connection.
See section SMTP Connections
for its fields.editor_command
StringEDITOR
is looked up.embedded_pty
booleanformat_flowed
booleanformat=flowed
[RFC3676] in text/plain
attachments.
(true)insert_user_agent
booleanUser-Agent
header in new drafts.
(true)default_header_values
hash table String[String]wrap_header_preamble
Option<(String, String)>store_sent_mail
booleanattribution_format_string
String%+f
— the sender's name and email address.%+n
— the sender's name (or email address, if no name is
included).%+a
— the sender's email address.attribution_use_posix_locale
booleanforward_as_attachment
boolean or askreply_prefix_list_to_strip
[String]reply_prefix
StringRe:
’.
(‘Re:
’)
RFC 2822, "Internet Message Format" has this to say on the matter:
When used in a reply, the field body MAY start with the string "Re: " (from the Latin "res", in the matter of) followed by the contents of the "Subject:" field body of the original message.
custom_compose_hooks
[{ name = String, command = String }]Example:
[composing] editor_cmd = '~/.local/bin/vim +/^$' embed = true custom_compose_hooks = [ { name ="spellcheck", command="aspell --mode email --dont-suggest --ignore-case list" }]
disabled_compose_hooks
[String]past-date-warn
— Warn if Date
header value is far in
the past or future.important-header-warn
— Warn if important headers (From
,
Date
, To
,
Cc
, Bcc
) are missing
or invalid.missing-attachment-warn
— Warn if Subject
or draft body mention
attachments but they are missing.empty-draft-warn
— Warn if draft has no subject and no body.signature_file
Pathuse_signature
boolsignature_file
setting.signature_delimiter
String\n\n-- \n
’)Shortcuts can take the following values:
Where char is a single character string, maximum 4 bytes long, like the corresponding type in Rust.
In the next subsection, you will find lists for each shortcut category. The headings before each list indicate the map key of the shortcut list. For example for the first list titled general the configuration is typed as follows:
[shortcuts.general] next_tab = 'T'
and for listing:
[shortcuts.listing] open_entry = "Enter" exit_entry = 'i'
In addition, each shortcuts section supports a TOML array of commands to associate a key to an array of COMMAND mode commands.
[shortcuts.listing] commands = [ { command = [ "tag remove trash", "flag unset trash" ], shortcut = "D" }, { command = [ "tag add trash", "flag set trash" ], shortcut = "d" } ]
Default values are shown in parentheses.
general
toggle_help
enter_command_mode
quit
go_to_tab
next_tab
scroll_right
scroll_left
scroll_up
scroll_down
next_page
prev_page
home_page
end_page
open_entry
info_message_next
info_message_previous
focus_in_text_field
next_search_result
previous_search_result
listing
scroll_up
scroll_down
next_page
prev_page
new_mail
next_account
prev_account
next_mailbox
prev_mailbox
open_mailbox
toggle_mailbox_collapse
search
refresh
set_seen
send_to_trash
union_modifier
diff_modifier
intersection_modifier
select_entry
select_motion
next_entry
previous_entry
focus_left
focus_right
exit_entry
open_entry
page_down
page_up
scroll_down
scroll_up
select_filter
See also named_filters
setting.
scroll_up
scroll_down
create_contact
edit_contact
export_contact
delete_contact
mail_contact
next_account
prev_account
edit
send_mail
scroll_up
scroll_down
To select an attachment, type its index (you will see the typed result in the command buffer on the bottom right of the status line), then issue the corresponding command.
add_addresses_to_contacts
edit
go_to_url
url_launcher
setting in
PAGER section)
(g)open_attachment
xdg-open
(a)open_mailcap
open_html
reply
reply_to_all
forward
return_to_normal_view
toggle_expand_headers
toggle_url_mode
go_to_url
(u)view_raw_source
change_charset
scroll_up
scroll_down
collapse_subtree
next_page
prev_page
reverse_thread_order
toggle_mailview
toggle_threadview
toggle_layout
Default values are shown in parentheses.
enable
booleanscript
Stringnew_mail_script
Stringscript
), with title as 1st
arg and body as 2nd. (none)xbiff_file_path
Stringplay_sound
booleansound_file
StringDefault values are shown in parentheses.
sticky_headers
booleanhtml_filter
Stringhtml_open
Stringfilter
Stringnamed_filters
String[String]Show menu with an empty filter
command. Example:
[pager] named_filters = { diff = "pygmentize -l diff -f 256", par = "par 72" }
format_flowed
booleansplit_long_lines
booleanminimum_width
numauto_choose_multipart_alternative
booleantext/html
alternative if text/plain
is empty in
multipart/alternative
attachments.
(true)show_date_in_my_timezone
booleanDate
: in local
timezone (true)url_launcher
Stringshow_extra_headers
[String]This setting is useful especially when used per-folder or per-account. For example, if you use rss2email (See r2e(1)) the e-mail you will receive will have the X-RSS-Feed header by default. You can show them only in the folder where you keep your feed items:
[accounts."personal".mailboxes] INBOX = {} "INBOX/Sent" = { sort_order=0 } "INBOX/Feeds" = { pager.show_extra_headers = ["X-RSS-Feed"] }
Default values are shown in parentheses.
datetime_fmt
Stringrecent_dates
BooleanX {minutes,hours,days} ago
’, up to
7 days. (true)filter
QueryExample:
filter = "not flags:seen" # show only unseen messages
index_style
Stringconversations | 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 |
unseen_flag
Option<String>thread_snoozed_flag
Option<String>💤\u{FE0E}
") [Rendered
as:r##
"💤︎"##
]selected_flag
Option<String>☑️ \u{2007}
")
[Rendered
as:r##
"☑️ "##
]attachment_flag
Option<String>📎\u{FE0E}
") [Rendered
as:r##
"📎︎"##
]highlight_self_flag
Option<String>highlight_self
booleanhighlight_self_flag
or not.
(false)thread_subject_pack
booleanthreaded_repeat_identical_from_values
booleanrelative_list_indices
booleanmail_view_divider
charthread_layout
auto | vertical |
horizontallisting.toggle_layout
shortcut.
(auto)The default values
has_sibling = " " no_sibling = " "; has_sibling_leaf = " " no_sibling_leaf = " "
render a mailbox tree like the following:
0 Inbox 3 1 Archive 2 Drafts 3 Lists 4 example-list-a 5 example-list-b 6 Sent 7 Spam 8 Trash
Other possible trees:
has_sibling = " ┃" no_sibling = " " has_sibling_leaf = " ┣━" no_sibling_leaf = " ┗━"
0 Inbox 3 1 ┣━Archive 2 ┣━Drafts 3 ┣━Lists 4 ┃ ┣━example-list-a 5 ┃ ┗━example-list-b 6 ┣━Sent 7 ┣━Spam 8 ┗━Trash
A completely ASCII one:
has_sibling = " |" no_sibling = " " has_sibling_leaf = " |\_" no_sibling_leaf = " \_"
0 Inbox 3 1 |\_Archive 2 |\_Drafts 3 |\_Lists 4 | |\_example-list-a 5 | \_example-list-b 6 |\_Sent 7 |\_Spam 8 \_Trash
Default values are shown in parentheses.
colours
hash table String[Color]Example:
[tags] # valid inputs: #HHHHHH, #ABC -> #AABBCC, XTERM_NAME, 0-255 byte colors = { signed="#Ff6600", replied="DeepSkyBlue4", draft="#f00", replied="8" } [accounts.dummy] ... [accounts.dummy.mailboxes] # per mailbox override: "INBOX" = { tags.ignore_tags=["inbox", ] }
Default values are shown in parentheses.
auto_verify_signatures
booleanauto_decrypt
booleanauto_sign
booleanauto_encrypt
booleansign_key
Stringdecrypt_key
Stringencrypt_key
Stringauto_remote_lookup
booleanremote_lookup_mechanisms
LocateKeyPossible mechanisms:
Some useful unicode combining marks (invisible characters that modify the presentation of visible characters before them) are:
\u{FE0E}
Emoji variation sequence select 15:
renders an emoji as text style (monochrome)\u{FE0F}
Emoji variation sequence select 16:
renders an emoji in color\u{2007}
Figure space, a space character with the
width of a digit in a monospace typefaceDefault values are shown in parentheses.
theme
Stringascii_drawing
booleanuse_color
booleanforce_text_presentation
booleanwindow_title
Stringfile_picker_command
Stringadd-attachment-file-picker
when composing new
mail. (None)themes
hash table String[String[Attribute]][terminal] theme = "themeB" [terminal.themes.themeA] "mail.view.body" = {fg = "HotPink3", bg = "LightSalmon1"} ... [terminal.themes.themeB] "mail.view.body" = {fg = "CadetBlue", bg = "White"} ... [terminal.themes.themeC] ...
use_mouse
booleantoggle mouse
. (false)mouse_flag
Stringprogress_spinner_sequence
Either < Integer, ProgressSpinner >Built-in sequences are:
0 ["-", "\", "|", "/"] 1 ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"] 2 ["⣀", "⣄", "⣤", "⣦", "⣶", "⣷", "⣿"] 3 ["⣀", "⣄", "⣆", "⣇", "⣧", "⣷", "⣿"] 4 ["○", "◔", "◐", "◕", "⬤"] 5 ["□", "◱", "◧", "▣", "■"] 6 ["□", "◱", "▨", "▩", "■"] 7 ["□", "◱", "▥", "▦", "■"] 8 ["░", "▒", "▓", "█"] 9 ["░", "█"] 10 ["⬜", "⬛"] 11 ["▱", "▰"] 12 ["▭", "◼"] 13 ["▯", "▮"] 14 ["◯", "⬤"] 15 ["⚪", "⚫"] 16 ["▖", "▗", "▘", "▝", "▞", "▚", "▙", "▟", "▜", "▛"] 17 ["|", "/", "-", "\"] 18 [".", "o", "O", "@", "*"] 19 ["◡◡", "⊙⊙", "◠◠", "⊙⊙"] 20 ["◜ ", " ◝", " ◞", "◟ "] 21 ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"] 22 ["▁", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃"] 23 [ "▉", "▊", "▋", "▌", "▍", "▎", "▏", "▎", "▍", "▌", "▋", "▊", "▉" ] 24 ["▖", "▘", "▝", "▗"] 25 ["▌", "▀", "▐", "▄"] 26 ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"] 27 ["◢", "◣", "◤", "◥"] 28 ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"] 29 ["⢎⡰", "⢎⡡", "⢎⡑", "⢎⠱", "⠎⡱", "⢊⡱", "⢌⡱", "⢆⡱"] 30 [".", "o", "O", "°", "O", "o", "."] 31 ["㊂", "㊀", "㊁"] 32 ["💛 ", "💙 ", "💜 ", "💚 ", "❤️ "] 33 [ "🕛 ", "🕐 ", "🕑 ", "🕒 ", "🕓 ", "🕔 ", "🕕 ", "🕖 ", "🕗 ", "🕘 ", "🕙 ", "🕚 " ] 34 ["🌍 ", "🌎 ", "🌏 "] 35 [ "[ ]", "[= ]", "[== ]", "[=== ]", "[ ===]", "[ ==]", "[ =]", "[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]" ] 36 ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "]
Or, define an array of strings each consisting of a frame in the progress sequence indicator for a custom spinner:
interval_ms
u64frames
[String]Example:
progress_spinner_sequence = { interval_ms = 150, frames = [ "-", "=", "≡" ] }
Default values are shown in parentheses.
log_file
Stringmaximum_level
Stringmaximum_level
will be
appended to the log file. Available levels are, in partial order:
This means that to turn logging off, set
maximum_level
to OFF.
(INFO)Default values are shown in parentheses.
hostname
Stringport
Integerenvelope_from
Stringauth
SmtpAuthsecurity
SmtpSecurityextensions
SmtpExtensionstype
none | auto |
xoauth2For type "auto":
username
Stringpassword
SmtpPasswordrequire_auth
booleanFor type "xoauth2":
token_command
Stringrequire_auth
booleanExamples:
auth = { type = "auto", username = "user", password = { type = "raw", value = "hunter2" } }
auth = { type = "auto", username = "user", password = "hunter2" }
auth = { type = "none" }
For Gmail (see Gmail OAUTH2 for details on the authentication token command):
auth = { type = "xoauth2", token_command = "TOKEN=$(python3 oauth2.py --user=xxx@gmail.com --quiet --client_id=1038[...].apps.googleusercontent.com --client_secret=[..] --refresh_token=[..] && python3 oauth2.py --user=xxx@gmail.com --generate_oauth2_string --quiet --access_token=$TOKEN" }
Examples:
password = { type = "raw", value = "hunter2" }
password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" }
Default security type is auto.
type
none | auto |
starttls | tlsdanger_accept_invalid_certs
booleanpipelining
booleanchunking
booleanprdr
booleandsn_notify
Stringv.0.5.0
https://toml.io/en/v0.5.0Copyright 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.)
May 20, 2024 | Debian |