appendlimit

package module
v0.0.0-...-e3baed7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 3 Imported by: 5

README

go-imap-appendlimit

GoDoc

The IMAP APPENDLIMIT Extension for go-imap.

This extension has been merged into go-imap. Use built-in support instead of this repository!

Usage

s.Enable(appendlimit.NewExtension())

The backend must implement appendlimit.Backend and appendlimit.User. Additionally, the backend's Mailbox.Status implementation must handle appendlimit.StatusAppendLimit.

License

MIT

Documentation

Overview

Implements the IMAP APPENDLIMIT Extension, as defined in RFC 7889.

Index

Constants

View Source
const Capability = "APPENDLIMIT"
View Source
const StatusAppendLimit imap.StatusItem = "APPENDLIMIT"

Variables

View Source
var ErrTooBig = server.ErrStatusResp(&imap.StatusResp{
	Type: imap.StatusRespNo,
	Code: codeTooBig,
	Info: "Message size exceeding limit",
})

An error that should be returned by User.CreateMessage when the message size is too big.

Functions

func MailboxStatusAppendLimit

func MailboxStatusAppendLimit(status *imap.MailboxStatus) *uint32

func NewExtension

func NewExtension() server.Extension

Create a new server extension.

func StatusSetAppendLimit

func StatusSetAppendLimit(status *imap.MailboxStatus, value *uint32)

StatusSetAppendLimit sets limit value in MailboxStatus object, nil pointer value will remove limit.

Types

type Backend

type Backend interface {
	// Get the fixed maximum message size in octets that the backend will accept
	// when creating a new message. If there is no limit, return nil.
	CreateMessageLimit() *uint32
}

A backend that supports retrieving per-user message size limits.

type User

type User interface {
	// Get the fixed maximum message size in octets that the backend will accept
	// when creating a new message. If there is no limit, return nil.
	//
	// This overrides the global backend limit.
	CreateMessageLimit() *uint32
}

A user that supports retrieving per-user message size limits.

Jump to

Keyboard shortcuts

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