Documentation ¶
Overview ¶
An IMAP server
Index ¶
Constants ¶
View Source
const ( // Noinferiors indicates it is not possible for any child levels of hierarchy to exist // under this name; no child levels exist now and none can be // created in the future. Noinferiors = 1 << iota // Noselect indicates it is not possible to use this name as a selectable mailbox. Noselect // Marked indicates that the mailbox has been marked "interesting" by the server; // the mailbox probably contains messages that have been added since // the last time the mailbox was selected Marked // Unmarked indicates the mailbox does not contain any additional messages since the // last time the mailbox was selected. Unmarked )
Mailbox flags
View Source
const DefaultListener = "0.0.0.0:143"
DefaultListener is the listener that is used if no listener is specified
Variables ¶
This section is empty.
Functions ¶
func AuthStoreOption ¶
AuthStoreOption adds an authenticaton backend
func ListenOption ¶
func ListenOption(Addr string) option
ListenOption adds an interface to listen to
func ListenSTARTTLSOoption ¶
func ListenSTARTTLSOoption(Addr, certFile, keyFile string) option
ListenSTARTTLSOoption enables STARTTLS with the given certificate and keyfile
func MaxClientsOption ¶
func MaxClientsOption(max uint) option
MaxClientsOption sets the MaxClients config
func StoreOption ¶
func StoreOption(m Mailstore) option
Add a mailstore to the config StoreOption add a mailstore to the config
Types ¶
type Mailbox ¶
type Mailbox struct { Name string // The name of the mailbox Path []string // Full mailbox path Id int64 // The id of the mailbox Flags uint8 // Mailbox flags }
Mailbox represents an IMAP mailbox
type Mailstore ¶
type Mailstore interface { // GetMailbox gets IMAP mailbox information // Returns nil if the mailbox does not exist GetMailbox(path []string) (*Mailbox, error) // GetMailboxes gets a list of mailboxes at the given path GetMailboxes(path []string) ([]*Mailbox, error) // FirstUnseen gets the sequence number of the first unseen message in an IMAP mailbox FirstUnseen(mbox int64) (int64, error) // TotalMessages gets the total number of messages in an IMAP mailbox TotalMessages(mbox int64) (int64, error) // RecentMessages gets the total number of unread messages in an IMAP mailbox RecentMessages(mbox int64) (int64, error) // NextUid gets the next available uid in an IMAP mailbox NextUid(mbox int64) (int64, error) }
Mailstore is a service responsible for I/O with the actual e-mails
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
boltstore
Package boltstore holds an implementation of github.com/alienscience/imapsrv/auth - AuthStore, using github.com/boltdb/bolt - DB.
|
Package boltstore holds an implementation of github.com/alienscience/imapsrv/auth - AuthStore, using github.com/boltdb/bolt - DB. |
mysqlstore
Package mysqlstore holds an implementation of github.com/alienscience/imapsrv/auth - AuthStore, using MySQL
|
Package mysqlstore holds an implementation of github.com/alienscience/imapsrv/auth - AuthStore, using MySQL |
demo
|
|
Click to show internal directories.
Click to hide internal directories.