uidplus

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package uidplus DOES NOT implement full RFC4315!

Excluded parts are:

  • Response `UIDNOTSTICKY`: All mailboxes of Bridge support stable UIDVALIDITY so it would never return this response

Otherwise the standard RFC4315 is followed.

Index

Constants

View Source
const Capability = "UIDPLUS"

Capability extension identifier.

Variables

This section is empty.

Functions

func AppendResponse

func AppendResponse(uidValidity uint32, targetSeq *OrderedSeq) error

AppendResponse prepares OK response with extended UID information about appended message.

func CopyResponse

func CopyResponse(uidValidity uint32, sourceSeq, targetSeq *OrderedSeq) error

CopyResponse prepares OK response with extended UID information about copied message.

func NewExtension

func NewExtension() server.Extension

NewExtension of UIDPLUS.

Types

type OrderedSeq

type OrderedSeq []uint32

OrderedSeq to remember Seq in order they are added. We didn't find any restriction in RFC that server must respond with ranges so we decided to always do explicit list. This makes sure that no dynamic ranges or out of the bound ranges are possible.

NOTE: potential issue with response length

  • the user selects large number of messages to be copied and the response line will be long,
  • list of UIDs which high values

which can create long response line. We didn't find a maximum length of one IMAP response line or maximum length of IMAP "response code" with parameters.

func (*OrderedSeq) Add

func (os *OrderedSeq) Add(num uint32)

Add number to sequence. Zero is not acceptable UID and it won't be added to list.

func (OrderedSeq) Len

func (os OrderedSeq) Len() int

Len return number of added seq numbers.

func (*OrderedSeq) String

func (os *OrderedSeq) String() string

type UIDExpunge

type UIDExpunge struct {
	SeqSet *imap.SeqSet
}

func (*UIDExpunge) Handle

func (e *UIDExpunge) Handle(conn server.Conn) error

func (*UIDExpunge) Parse

func (e *UIDExpunge) Parse(fields []interface{}) error

func (*UIDExpunge) UidHandle

func (e *UIDExpunge) UidHandle(conn server.Conn) error

type UIDExpungeMailbox

type UIDExpungeMailbox interface {
	Expunge() error
	UIDExpunge(*imap.SeqSet) error
}

Jump to

Keyboard shortcuts

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