pub enum ListCommand {
Show 16 variants Subscriptions, AddSubscription { address: String, subscription_options: SubscriptionOptions, }, RemoveSubscription { address: String, }, UpdateSubscription { address: String, subscription_options: SubscriptionOptions, }, AddPostPolicy { announce_only: bool, subscription_only: bool, approval_needed: bool, open: bool, custom: bool, }, RemovePostPolicy { pk: i64, }, AddSubscriptionPolicy { send_confirmation: bool, open: bool, manual: bool, request: bool, custom: bool, }, RemoveSubscriptionPolicy { pk: i64, }, AddListOwner { address: String, name: Option<String>, }, RemoveListOwner { pk: i64, }, EnableSubscription { address: String, }, DisableSubscription { address: String, }, Update { name: Option<String>, id: Option<String>, address: Option<String>, description: Option<String>, archive_url: Option<String>, owner_local_part: Option<String>, request_local_part: Option<String>, verify: Option<bool>, hidden: Option<bool>, enabled: Option<bool>, }, Health, Info, ImportMembers { url: String, username: String, password: String, list_id: String, dry_run: bool, skip_owners: bool, },
}

Variants§

§

Subscriptions

List subscriptions of list.

§

AddSubscription

Fields

§address: String

E-mail address.

§subscription_options: SubscriptionOptions

Add subscription to list.

§

RemoveSubscription

Fields

§address: String

E-mail address.

Remove subscription from list.

§

UpdateSubscription

Fields

§address: String

Address to edit.

§subscription_options: SubscriptionOptions

Update subscription info.

§

AddPostPolicy

Fields

§announce_only: bool

Only list owners can post.

§subscription_only: bool

Only subscriptions can post.

§approval_needed: bool

Subscriptions can post. Other posts must be approved by list owners.

§open: bool

Anyone can post without restrictions.

§custom: bool

Allow posts, but handle it manually.

Add a new post policy.

§

RemovePostPolicy

Fields

§pk: i64

Post policy primary key.

§

AddSubscriptionPolicy

Fields

§send_confirmation: bool

Send confirmation e-mail when subscription is finalized.

§open: bool

Anyone can subscribe without restrictions.

§manual: bool

Only list owners can manually add subscriptions.

§request: bool

Anyone can request to subscribe.

§custom: bool

Allow subscriptions, but handle it manually.

Add subscription policy to list.

§

RemoveSubscriptionPolicy

Fields

§pk: i64

Subscription policy primary key.

§

AddListOwner

Fields

§address: String

Add list owner to list.

§

RemoveListOwner

Fields

§pk: i64

List owner primary key.

§

EnableSubscription

Fields

§address: String

Subscription address.

Alias for update-subscription –enabled true.

§

DisableSubscription

Fields

§address: String

Subscription address.

Alias for update-subscription –enabled false.

§

Update

Fields

§name: Option<String>

New list name.

§id: Option<String>

New List-ID.

§address: Option<String>

New list address.

§description: Option<String>

New list description.

§archive_url: Option<String>

New list archive URL.

§owner_local_part: Option<String>

New owner address local part. If empty, it defaults to ‘+owner’.

§request_local_part: Option<String>

New request address local part. If empty, it defaults to ‘+request’.

§verify: Option<bool>

Require verification of e-mails for new subscriptions.

Subscriptions that are initiated from the subscription’s address are verified automatically.

§hidden: Option<bool>

Public visibility of list.

If hidden, the list will not show up in public APIs unless requests to it won’t work.

§enabled: Option<bool>

Enable or disable the list’s functionality.

If not enabled, the list will continue to show up in the database but e-mails and requests to it won’t work.

Update mailing list details.

§

Health

Show mailing list health status.

§

Info

Show mailing list info.

§

ImportMembers

Fields

§url: String

REST HTTP endpoint e.g. http://localhost:9001/3.0/

§username: String

REST HTTP Basic Authentication username.

§password: String

REST HTTP Basic Authentication password.

§list_id: String

List ID of remote list to query.

§dry_run: bool

Show what would be inserted without performing any changes.

§skip_owners: bool

Don’t import list owners.

Import members in a local list from a remote mailman3 REST API instance.

To find the id of the remote list, you can check URL/lists. Example with curl:

curl –anyauth -u admin:pass “http://localhost:9001/3.0/lists”

If you’re trying to import an entire list, create it first and then import its users with this command.

Example: mpot -c conf.toml list list-general import-members –url “http://localhost:9001/3.0/” –username admin –password password –list-id list-general.example.com –skip-owners –dry-run

Trait Implementations§

source§

impl Debug for ListCommand

source§

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

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

impl FromArgMatches for ListCommand

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 ListCommand

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.