Enum deltachat::config::Config

source ·
pub enum Config {
Show 82 variants Addr, MailServer, MailUser, MailPw, MailPort, MailSecurity, ImapCertificateChecks, SendServer, SendUser, SendPw, SendPort, SendSecurity, SmtpCertificateChecks, ServerFlags, Socks5Enabled, Socks5Host, Socks5Port, Socks5User, Socks5Password, Displayname, Selfstatus, Selfavatar, BccSelf, E2eeEnabled, MdnsEnabled, SentboxWatch, MvboxMove, OnlyFetchMvbox, ShowEmails, MediaQuality, FetchExistingMsgs, FetchedExistingMsgs, KeyGenType, DeleteServerAfter, DeleteDeviceAfter, DeleteToTrash, SaveMimeHeaders, ConfiguredAddr, ConfiguredMailServer, ConfiguredMailUser, ConfiguredMailPw, ConfiguredMailPort, ConfiguredMailSecurity, ConfiguredImapCertificateChecks, ConfiguredSendServer, ConfiguredSendUser, ConfiguredSendPw, ConfiguredSendPort, ConfiguredSmtpCertificateChecks, ConfiguredServerFlags, ConfiguredSendSecurity, ConfiguredInboxFolder, ConfiguredMvboxFolder, ConfiguredSentboxFolder, ConfiguredTrashFolder, ConfiguredTimestamp, ConfiguredProvider, Configured, SecondaryAddrs, SysVersion, SysMsgsizeMaxRecommended, SysConfigKeys, Bot, SkipStartMessages, NotifyAboutWrongPw, QuotaExceeding, WebrtcInstance, LastHousekeeping, LastCantDecryptOutgoingMsgs, ScanAllFoldersDebounceSecs, DisableIdle, DownloadLimit, SyncMsgs, AuthservIdCandidates, SignUnencrypted, DebugLogging, LastMsgId, GossipPeriod, VerifiedOneOnOneChats, KeyId, SelfReportingId, WebxdcIntegration,
}
Expand description

The available configuration keys.

Variants§

§

Addr

Email address, used in the From: field.

§

MailServer

IMAP server hostname.

§

MailUser

IMAP server username.

§

MailPw

IMAP server password.

§

MailPort

IMAP server port.

§

MailSecurity

IMAP server security (e.g. TLS, STARTTLS).

§

ImapCertificateChecks

How to check IMAP server TLS certificates.

§

SendServer

SMTP server hostname.

§

SendUser

SMTP server username.

§

SendPw

SMTP server password.

§

SendPort

SMTP server port.

§

SendSecurity

SMTP server security (e.g. TLS, STARTTLS).

§

SmtpCertificateChecks

How to check SMTP server TLS certificates.

§

ServerFlags

Whether to use OAuth 2.

Historically contained other bitflags, which are now deprecated. Should not be extended in the future, create new config keys instead.

§

Socks5Enabled

True if SOCKS5 is enabled.

Can be used to disable SOCKS5 without erasing SOCKS5 configuration.

§

Socks5Host

SOCKS5 proxy server hostname or address.

§

Socks5Port

SOCKS5 proxy server port.

§

Socks5User

SOCKS5 proxy server username.

§

Socks5Password

SOCKS5 proxy server password.

§

Displayname

Own name to use in the From: field when sending messages.

§

Selfstatus

Own status to display, sent in message footer.

§

Selfavatar

Own avatar filename.

§

BccSelf

Send BCC copy to self.

Should be enabled for multidevice setups.

§

E2eeEnabled

True if encryption is preferred according to Autocrypt standard.

§

MdnsEnabled

True if Message Delivery Notifications (read receipts) should be sent and requested.

§

SentboxWatch

True if “Sent” folder should be watched for changes.

§

MvboxMove

True if chat messages should be moved to a separate folder.

§

OnlyFetchMvbox

Watch for new messages in the “Mvbox” (aka DeltaChat folder) only.

This will not entirely disable other folders, e.g. the spam folder will also still be watched for new messages.

§

ShowEmails

Whether to show classic emails or only chat messages.

§

MediaQuality

Quality of the media files to send.

§

FetchExistingMsgs

If set to “1”, on the first time start_io() is called after configuring, the newest existing messages are fetched. Existing recipients are added to the contact database regardless of this setting.

§

FetchedExistingMsgs

If set to “1”, then existing messages are considered to be already fetched. This flag is reset after successful configuration.

§

KeyGenType

Type of the OpenPGP key to generate.

§

DeleteServerAfter

Timer in seconds after which the message is deleted from the server.

Equals to 0 by default, which means the message is never deleted.

Value 1 is treated as “delete at once”: messages are deleted immediately, without moving to DeltaChat folder.

§

DeleteDeviceAfter

Timer in seconds after which the message is deleted from the device.

Equals to 0 by default, which means the message is never deleted.

§

DeleteToTrash

Move messages to the Trash folder instead of marking them “\Deleted”. Overrides ProviderOptions::delete_to_trash.

§

SaveMimeHeaders

Save raw MIME messages with headers in the database if true.

§

ConfiguredAddr

The primary email address. Also see SecondaryAddrs.

§

ConfiguredMailServer

Configured IMAP server hostname.

§

ConfiguredMailUser

Configured IMAP server username.

§

ConfiguredMailPw

Configured IMAP server password.

§

ConfiguredMailPort

Configured IMAP server port.

§

ConfiguredMailSecurity

Configured IMAP server security (e.g. TLS, STARTTLS).

§

ConfiguredImapCertificateChecks

How to check IMAP server TLS certificates.

§

ConfiguredSendServer

Configured SMTP server hostname.

§

ConfiguredSendUser

Configured SMTP server username.

§

ConfiguredSendPw

Configured SMTP server password.

§

ConfiguredSendPort

Configured SMTP server port.

§

ConfiguredSmtpCertificateChecks

How to check SMTP server TLS certificates.

§

ConfiguredServerFlags

Whether OAuth 2 is used with configured provider.

§

ConfiguredSendSecurity

Configured SMTP server security (e.g. TLS, STARTTLS).

§

ConfiguredInboxFolder

Configured folder for incoming messages.

§

ConfiguredMvboxFolder

Configured folder for chat messages.

§

ConfiguredSentboxFolder

Configured “Sent” folder.

§

ConfiguredTrashFolder

Configured “Trash” folder.

§

ConfiguredTimestamp

Unix timestamp of the last successful configuration.

§

ConfiguredProvider

ID of the configured provider from the provider database.

§

Configured

True if account is configured.

§

SecondaryAddrs

All secondary self addresses separated by spaces (addr1@example.org addr2@example.org addr3@example.org)

§

SysVersion

Read-only core version string.

§

SysMsgsizeMaxRecommended

Maximal recommended attachment size in bytes.

§

SysConfigKeys

Space separated list of all config keys available.

§

Bot

True if it is a bot account.

§

SkipStartMessages

True when to skip initial start messages in groups.

§

NotifyAboutWrongPw

Whether we send a warning if the password is wrong (set to false when we send a warning because we do not want to send a second warning)

§

QuotaExceeding

If a warning about exceeding quota was shown recently, this is the percentage of quota at the time the warning was given. Unset, when quota falls below minimal warning threshold again.

§

WebrtcInstance

address to webrtc instance to use for videochats

§

LastHousekeeping

Timestamp of the last time housekeeping was run

§

LastCantDecryptOutgoingMsgs

Timestamp of the last CantDecryptOutgoingMsgs notification.

§

ScanAllFoldersDebounceSecs

To how many seconds to debounce scan_all_folders. Used mainly in tests, to disable debouncing completely.

§

DisableIdle

Whether to avoid using IMAP IDLE even if the server supports it.

This is a developer option for testing “fake idle”.

§

DownloadLimit

Defines the max. size (in bytes) of messages downloaded automatically. 0 = no limit.

§

SyncMsgs

Enable sending and executing (applying) sync messages. Sending requires BccSelf to be set.

§

AuthservIdCandidates

Space-separated list of all the authserv-ids which we believe may be the one of our email server.

See crate::authres::update_authservid_candidates.

§

SignUnencrypted

Make all outgoing messages with Autocrypt header “multipart/signed”.

§

DebugLogging

Let the core save all events to the database. This value is used internally to remember the MsgId of the logging xdc

§

LastMsgId

Last message processed by the bot.

§

GossipPeriod

How often to gossip Autocrypt keys in chats with multiple recipients, in seconds. 2 days by default.

This is not supposed to be changed by UIs and only used for testing.

§

VerifiedOneOnOneChats

Feature flag for verified 1:1 chats; the UI should set it to 1 if it supports verified 1:1 chats. Regardless of this setting, chat.is_protected() returns true while the key is verified, and when the key changes, an info message is posted into the chat. 0=Nothing else happens when the key changes. 1=After the key changed, can_send() returns false and is_protection_broken() returns true until chat_id.accept() is called.

§

KeyId

Row ID of the key in the keypairs table used for signatures, encryption to self and included in Autocrypt header.

§

SelfReportingId

This key is sent to the self_reporting bot so that the bot can recognize the user without storing the email address

§

WebxdcIntegration

MsgId of webxdc map integration.

Implementations§

source§

impl Config

source

pub(crate) fn is_synced(&self) -> bool

Whether the config option is synced across devices.

This must be checked on both sides so that if there are different client versions, the synchronisation of a particular option is either done or not done in both directions. Moreover, receivers of a config value need to check if a key can be synced because if it is a file path, it could otherwise lead to exfiltration of files from a receiver’s device if we assume an attacker to have control of a device in a multi-device setting or if multiple users are sharing an account. Another example is Self::SyncMsgs itself which mustn’t be controlled by other devices.

source

pub(crate) fn needs_io_restart(&self) -> bool

Whether the config option needs an IO scheduler restart to take effect.

Trait Implementations§

source§

impl AsRef<str> for Config

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

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

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

impl<'de> Deserialize<'de> for Config

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Config

source§

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

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

impl EnumProperty for Config

source§

fn get_str(&self, prop: &str) -> Option<&'static str>

§

fn get_int(&self, _prop: &str) -> Option<usize>

§

fn get_bool(&self, _prop: &str) -> Option<bool>

source§

impl FromStr for Config

§

type Err = ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Config, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl IntoEnumIterator for Config

source§

impl Ord for Config

source§

fn cmp(&self, other: &Config) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Config

source§

fn eq(&self, other: &Config) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Config

source§

fn partial_cmp(&self, other: &Config) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Config

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&str> for Config

§

type Error = ParseError

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

fn try_from(s: &str) -> Result<Config, <Self as TryFrom<&str>>::Error>

Performs the conversion.
source§

impl Copy for Config

source§

impl Eq for Config

source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where 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> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,