Documentation
¶
Overview ¶
Package presets holds per-provider connection defaults: host, port, TLS mode, folder-name fallbacks for servers without SPECIAL-USE, and known quirks.
Index ¶
Constants ¶
View Source
const ( TLSImplicit = "implicit" TLSStartTLS = "starttls" )
TLS modes, as stored in accounts.tls_mode.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Preset ¶
type Preset struct {
Name string // stored in accounts.preset
Label string
Host string // empty for generic: the user supplies it
Port int
TLSMode string
// Folders maps a special-use role to folder names to look for, most likely first,
// when the server does not report the role itself. Matching ignores case.
Folders map[string][]string
HelpURL string // where the user creates an app password; for an OAuthOnly preset, the provider's IMAP settings
// PasteLabel is what the provider calls the secret the user pastes into the wizard;
// empty for an OAuthOnly preset, which takes none.
PasteLabel string
// LocalPartLogin: the server may want the part before "@" as the username.
LocalPartLogin bool
// Domains are the domains one account's address is known by, lowercase: the same name
// before "@" receives mail at each of them. Empty = not known, and only a username that
// is a full address says what the account's address is.
Domains []string
// OAuthOnly: the provider takes no password or app password over IMAP, only its own
// sign-in (OAuth), so a mailbox here is connected only by a module that signs in to it
// (one-click sign-in, ext.MailboxSignIn). Without one the preset is not offered.
OAuthOnly bool
}
Preset is one provider's defaults.
func All ¶
func All() []Preset
All returns every preset, generic last. accounts.preset holds one of their names.
Click to show internal directories.
Click to hide internal directories.