imap

package
v0.0.0-...-ed89ad4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler is responsible for reading from mailboxes and updating the notmuch index Note that a single handler can only read from one mailbox

func New

func New(db *notmuch.Database,
	maildirPath string,
	mailbox Mailbox) (*Handler, error)

New creates a new Handler

func (*Handler) CheckMessages

func (h *Handler) CheckMessages() error

CheckMessages checks for new/unindexed messages on the server

func (*Handler) Close

func (h *Handler) Close() error

Close closes all open handles, flushes channels and saves configuration data

type IndexUpdate

type IndexUpdate struct {
	Path      string   // Path to file to be updated
	MessageID string   // MessageID to be updated
	Tags      []string // Tags to add/remove from message (entries prefixed with "-" will be removed)
}

IndexUpdate is used to signal that a message should be tagged with specific information

type Mailbox

type Mailbox struct {
	Server      string
	Port        int
	Username    string
	Password    string
	UseTLS      bool `yaml:"use_tls"`
	UseStartTLS bool `yaml:"use_starttls"`
	Folders     struct {
		Include []string
		Exclude []string
	}

	FolderTags map[string]string `yaml:"folder_tags"`
}

Mailbox defines the available options for a IMAP mailbox to pull from

Jump to

Keyboard shortcuts

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