3 unstable releases

0.2.1 Jan 30, 2023
0.2.0 Jan 3, 2023
0.1.0 Jun 29, 2022

#635 in Configuration

25 downloads per month
Used in 3 crates

GPL-3.0-or-later

17KB
272 lines

vomit-config

Crates.io builds.sr.ht status Documentation

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

See the crate documentation for more information.


lib.rs:

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.
[example]
## `local` defaults to "~/.maildir", but can be set explicitly:
local = '/home/test/.maildir'
## The mail server. Must support IMAPS
remote = 'imap.example.com'
## 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/example.com'
## If sending mail is handled by a different server (i.e. a dedicated
## SMTP server), override it like this:
send.remote = 'smtp.example.com'
## Some mail setups even have different credentials for sending mail,
## So those can be overridden, too:
send.user = 'johndoe@example.com'
## See password and pass-cmd above:
#send.password = 's3cr3t'
send.pass-cmd = 'pass show mail/smtp.example.com'

Dependencies

~1.4–2.5MB
~45K SLoC