Enum mailpot_cli::args::Command
source · pub enum Command {
Show 18 variants
SampleConfig {
with_smtp: bool,
},
DumpDatabase,
ListLists,
List {
list_id: String,
cmd: ListCommand,
},
CreateList {
name: String,
id: String,
address: String,
description: Option<String>,
archive_url: Option<String>,
},
Post {
dry_run: bool,
},
FlushQueue {
dry_run: bool,
},
ErrorQueue {
cmd: QueueCommand,
},
Queue {
queue: Queue,
cmd: QueueCommand,
},
ImportMaildir {
list_id: String,
maildir_path: PathBuf,
},
UpdatePostfixConfig {
master_cf: Option<PathBuf>,
config: PostfixConfig,
},
PrintPostfixConfig {
config: PostfixConfig,
},
Accounts,
AccountInfo {
address: String,
},
AddAccount {
address: String,
password: String,
name: Option<String>,
public_key: Option<String>,
enabled: Option<bool>,
},
RemoveAccount {
address: String,
},
UpdateAccount {
address: String,
password: Option<String>,
name: Option<Option<String>>,
public_key: Option<Option<String>>,
enabled: Option<Option<bool>>,
},
Repair {
fix: bool,
all: bool,
datetime_header_value: bool,
remove_empty_accounts: bool,
remove_accepted_subscription_requests: bool,
warn_list_no_owner: bool,
},
}
Variants§
SampleConfig
Prints a sample config file to STDOUT.
You can generate a new configuration file by writing the output to a file, e.g: mpot sample-config –with-smtp > config.toml
DumpDatabase
Dumps database data to STDOUT.
ListLists
Lists all registered mailing lists.
List
Mailing list management.
CreateList
Fields
Create new list.
Post
Post message from STDIN to list.
FlushQueue
Flush outgoing e-mail queue.
ErrorQueue
Fields
cmd: QueueCommand
Mail that has not been handled properly end up in the error queue.
Queue
Mail that has not been handled properly end up in the error queue.
ImportMaildir
Fields
Import a maildir folder into an existing list.
UpdatePostfixConfig
Fields
config: PostfixConfig
Update postfix maps and master.cf (probably needs root permissions).
PrintPostfixConfig
Fields
config: PostfixConfig
Print postfix maps and master.cf entry to STDOUT.
Map output should be added to transport_maps and local_recipient_maps parameters in postfix’s main.cf. It must be saved in a plain text file. To make postfix be able to read them, the postmap application must be executed with the path to the map file as its sole argument.
postmap /path/to/mylist_maps
postmap is usually distributed along with the other postfix binaries.
The master.cf entry must be manually appended to the master.cf file. See https://www.postfix.org/master.5.html.
Accounts
All Accounts.
AccountInfo
Account info.
AddAccount
Fields
Add account.
RemoveAccount
Remove account.
UpdateAccount
Fields
Update account info.
Repair
Fields
Show and fix possible data mistakes or inconsistencies.
Trait Implementations§
source§impl FromArgMatches for Command
impl FromArgMatches for Command
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§impl Subcommand for Command
impl Subcommand for Command
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommand