Crate vomit_config

source ·
Expand description

This crate provides a unified config file for all tools that are part of the Vomit project.

It aims to provide configuration options for various aspects of email accounts. Most tools will only need a subset of the available options, but once an account is fully configured, all tools will be able to work with it.

While written for the Vomit project, this is essentially a generic email account configuration library. If you think it might be useful for you feel free to use outside of Vomit.

The standard location is $XDG_CONFIG_DIR/vomit/config.toml, which usually means ~/.config/vomit/config.toml.

Projects using this will have their own documentation about which values they require. Here is a sample with all available options (though some commented out), including comments on their usage:

## This section defines one account named "example". Most tools
## support multiple accounts. If not specified, tools should default
## to the first account in the config file.
## `local` defaults to "~/.maildir", but can be set explicitly:
local = '/home/test/.maildir'
## The mail server. Must support IMAPS
remote = ''
## Login name for the mail server
user = 'johndoe'
## Password for the mail server. Can be set explicitly:
#password = 'hunter1'
## but that's not great for security. Instead use a command,
## e.g. to interact with your password manager
pass-cmd = 'pass show mail/'
## If sending mail is handled by a different server (i.e. a dedicated
## SMTP server), override it like this:
send.remote = ''
## Some mail setups even have different credentials for sending mail,
## So those can be overridden, too:
send.user = ''
## See password and pass-cmd above:
#send.password = 's3cr3t'
send.pass-cmd = 'pass show mail/'


Represents the configuration of a specific account
Represents a complete config file, which can hold multiple Accounts



Returns the (system dependent) default path to the configuration file
Load a configuration file