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

Fields

§with_smtp: bool

Use an SMTP connection instead of a shell process.

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

Fields

§list_id: String

Selects mailing list to operate on.

Mailing list management.

§

CreateList

Fields

§name: String

List name.

§id: String

List ID.

§address: String

List e-mail address.

§description: Option<String>

List description.

§archive_url: Option<String>

List archive URL.

Create new list.

§

Post

Fields

§dry_run: bool

Show e-mail processing result without actually consuming it.

Post message from STDIN to list.

§

FlushQueue

Fields

§dry_run: bool

Show e-mail processing result without actually consuming it.

Flush outgoing e-mail queue.

§

ErrorQueue

Fields

Mail that has not been handled properly end up in the error queue.

§

Queue

Fields

§queue: Queue

Mail that has not been handled properly end up in the error queue.

§

ImportMaildir

Fields

§list_id: String

List-ID or primary key value.

§maildir_path: PathBuf

Path to a maildir mailbox. Must contain {cur, tmp, new} folders.

Import a maildir folder into an existing list.

§

UpdatePostfixConfig

Fields

§master_cf: Option<PathBuf>

Override location of master.cf file (default: /etc/postfix/master.cf)

Update postfix maps and master.cf (probably needs root permissions).

§

PrintPostfixConfig

Fields

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

Fields

§address: String

Account address.

Account info.

§

AddAccount

Fields

§address: String

E-mail address.

§password: String

SSH public key for authentication.

§name: Option<String>

Name.

§public_key: Option<String>

Public key.

§enabled: Option<bool>

Is account enabled.

Add account.

§

RemoveAccount

Fields

§address: String

E-mail address.

Remove account.

§

UpdateAccount

Fields

§address: String

Address to edit.

§password: Option<String>

Public key for authentication.

§name: Option<Option<String>>

Name.

§public_key: Option<Option<String>>

Public key.

§enabled: Option<Option<bool>>

Is account enabled.

Update account info.

§

Repair

Fields

§fix: bool

Fix errors (default: false)

§all: bool

Select all tests (default: false)

§datetime_header_value: bool

Post datetime column must have the Date: header value, in RFC2822 format.

§remove_empty_accounts: bool

Remove accounts that have no matching subscriptions.

§remove_accepted_subscription_requests: bool

Remove subscription requests that have been accepted.

§warn_list_no_owner: bool

Warn if a list has no owners.

Show and fix possible data mistakes or inconsistencies.

Trait Implementations§

source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgMatches for Command

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Subcommand for Command

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.