Documentation
¶
Index ¶
- func ListenAndServe(redisAddr, imapAddr string, debugMode bool) error
- type Backend
- type Mailbox
- func (m *Mailbox) Check() error
- func (m *Mailbox) CopyMessages(uid bool, seqSet *imap.SeqSet, destName string) error
- func (m *Mailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error
- func (m *Mailbox) Expunge() error
- func (m *Mailbox) Info() (*imap.MailboxInfo, error)
- func (m *Mailbox) ListMessages(uid bool, seqSet *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
- func (m *Mailbox) MoveMessages(uid bool, seqSet *imap.SeqSet, destName string) error
- func (m *Mailbox) Name() string
- func (m *Mailbox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)
- func (m *Mailbox) SetSubscribed(subscribed bool) error
- func (m *Mailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
- func (m *Mailbox) UpdateMessagesFlags(uid bool, seqSet *imap.SeqSet, operation imap.FlagsOp, flags []string) error
- type Message
- type Server
- type User
- func (u *User) CreateMailbox(name string) error
- func (u *User) DeleteMailbox(name string) error
- func (u *User) GetMailbox(name string) (backend.Mailbox, error)
- func (u *User) ListMailboxes(subscribed bool) ([]backend.Mailbox, error)
- func (u *User) Logout() error
- func (u *User) RenameMailbox(existingName, newName string) error
- func (u *User) Username() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe starts the IMAP server and listens for connections
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements the go-imap backend interface
func NewBackend ¶
NewBackend creates a new IMAP backend
type Mailbox ¶
type Mailbox struct {
// contains filtered or unexported fields
}
Mailbox represents an IMAP mailbox (folder)
func (*Mailbox) CopyMessages ¶
CopyMessages copies the specified messages to another mailbox
func (*Mailbox) CreateMessage ¶
CreateMessage adds a new message to the mailbox
func (*Mailbox) ListMessages ¶
func (m *Mailbox) ListMessages(uid bool, seqSet *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
ListMessages returns a list of messages
func (*Mailbox) MoveMessages ¶
MoveMessages moves the specified messages to another mailbox
func (*Mailbox) SearchMessages ¶
SearchMessages searches for messages matching the given criteria
func (*Mailbox) SetSubscribed ¶
SetSubscribed sets the mailbox subscription status
type Message ¶
type Message struct { Email *mail.Email Uid uint32 Flags []string Key string // Redis key where this message is stored }
Message represents an email message
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an IMAP server
type User ¶
type User struct {
// contains filtered or unexported fields
}
User represents a user connected to the IMAP server
func (*User) CreateMailbox ¶
CreateMailbox creates a new mailbox
func (*User) DeleteMailbox ¶
DeleteMailbox deletes a mailbox
func (*User) GetMailbox ¶
GetMailbox returns a mailbox by name
func (*User) ListMailboxes ¶
ListMailboxes returns a list of mailboxes available for this user
func (*User) RenameMailbox ¶
RenameMailbox renames a mailbox