imapmaildir

package module
v0.0.0-...-460da6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 20 Imported by: 0

README

go-imap-maildir

Maildir + BoltDB storage backend for go-imap. WIP.

Documentation

Index

Constants

View Source
const (
	InboxName      = "INBOX"
	HierarchySep   = "."
	MaxMboxNesting = 100

	IndexFile = "imapmaildir-index.db"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Log   *log.Logger
	Debug *log.Logger

	PathTemplate  string
	Authenticator func(*imap.ConnInfo, string, string) (bool, error)
	// contains filtered or unexported fields
}

func New

func New(pathTemplate string) (*Backend, error)

func (*Backend) Close

func (b *Backend) Close() error

func (*Backend) CreateUser

func (b *Backend) CreateUser(username string) error

func (*Backend) GetUser

func (b *Backend) GetUser(username string) (backend.User, error)

func (*Backend) Login

func (b *Backend) Login(connInfo *imap.ConnInfo, username, password string) (backend.User, error)

type Mailbox

type Mailbox struct {
	// contains filtered or unexported fields
}

func (*Mailbox) Check

func (m *Mailbox) Check() error

func (*Mailbox) Close

func (m *Mailbox) Close() error

func (*Mailbox) CopyMessages

func (m *Mailbox) CopyMessages(uid bool, seqset *imap.SeqSet, dest string) error

func (*Mailbox) CreateMessage

func (m *Mailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error

func (*Mailbox) Expunge

func (m *Mailbox) Expunge() error

func (*Mailbox) Info

func (m *Mailbox) Info() (*imap.MailboxInfo, error)

func (*Mailbox) ListMessages

func (m *Mailbox) ListMessages(uid bool, seqset *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error

func (*Mailbox) Name

func (m *Mailbox) Name() string

func (*Mailbox) SearchMessages

func (m *Mailbox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)

func (*Mailbox) SetSubscribed

func (m *Mailbox) SetSubscribed(subscribed bool) error

func (*Mailbox) Status

func (m *Mailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)

func (*Mailbox) UpdateMessagesFlags

func (m *Mailbox) UpdateMessagesFlags(uid bool, seqset *imap.SeqSet, operation imap.FlagsOp, flags []string) error

type User

type User struct {
	// contains filtered or unexported fields
}

func (*User) CreateMailbox

func (u *User) CreateMailbox(mbox string) error

func (*User) DeleteMailbox

func (u *User) DeleteMailbox(mbox string) error

func (*User) GetMailbox

func (u *User) GetMailbox(mbox string) (backend.Mailbox, error)

func (*User) ListMailboxes

func (u *User) ListMailboxes(subscribed bool) ([]backend.Mailbox, error)

func (*User) Logout

func (u *User) Logout() error

func (*User) RenameMailbox

func (u *User) RenameMailbox(existingName, newName string) error

func (*User) Username

func (u *User) Username() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL