imap

package
v0.0.0-...-49ef9be Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: GPL-2.0, GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright © 2020 Elias Norberg Licensed under the GPLv3 or later. See COPYING at the root of the repository for details.

Copyright © 2020 Elias Norberg Licensed under the GPLv3 or later. See COPYING at the root of the repository for details.

Copyright © 2020 Elias Norberg Licensed under the GPLv3 or later. See COPYING at the root of the repository for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
	*uidplus.UidPlusClient
}

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(mailbox config.Mailbox) (*Handler, error)

New creates a new Handler for processing IMAP mailboxes

func (*Handler) AddMessage

func (h *Handler) AddMessage(info mail.Info, reader imap.Literal) (mail.Info, error)

AddMessage uploads a message to the IMAP server, and places it in the specific folder

func (*Handler) CheckMessages

func (h *Handler) CheckMessages(ctx context.Context, md *maildir.Maildir) error

CheckMessages checks for new/unindexed messages on the server If 'fullScan' is set to true, we will iterate through all messages, and check for any updated flags that doesn't match our current set

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

Jump to

Keyboard shortcuts

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