Documentation ¶
Index ¶
- type CtxValuesStruct
- type DeliveryItem
- type DeliveryState
- type ImapFetchIter
- type ImapFolder
- type ImapIterator
- type ImapMboxInfo
- type ImapMessage
- type ImapMessageHeader
- type ImapMessageHeaderFields
- type ImapMessageMultipartReader
- type ImapMsgInfo
- type ImapMsgInfoIter
- type ImapNumSetIter
- type ImapSearchIter
- type ImapSetRange
- type ImapStoreFlagsIter
- type ImapSubscription
- type MailStorage
- type MailstoragePlugin
- type MessageReaderWriter
- type Plugin
- type PluginEngine
- type QueueItem
- type QueueMessage
- type RuleActionStruct
- type RuleConditionStruct
- type RuleStruct
- type SettingsDbPlugin
- type SmartHost
- type SmtpQueue
- type SmtpQueuePlugin
- type UserDBPlugin
- type UserDBProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CtxValuesStruct ¶
type CtxValuesStruct struct { Debug bool NodeID string DataDir string Settings SettingsDbPlugin Plugins }
type DeliveryItem ¶
type DeliveryItem struct { MID string Helo string IP string TLS bool Sender string Rcpt string MsgRW MessageReaderWriter Body []byte }
-----------------------------------------------------------------------------
type DeliveryState ¶
type ImapFetchIter ¶
type ImapFetchIter interface { ImapIterator Val() (uint64, string, error) }
type ImapFolder ¶
type ImapFolder interface { Close() GetSubscription() ImapSubscription GetParsedRules() []*RuleStruct SaveRules([]*RuleStruct) MsgInfos() []*ImapMsgInfo GetMsgTime(*ImapMsgInfo) time.Time GetMsgBodystructure(*ImapMsgInfo) (string, string) GetMsgEnvelopeFields(*ImapMsgInfo) string GetMsgFlagNames(info *ImapMsgInfo) []string AddFlagNamesToMsg(*ImapMsgInfo, []string) (int, []string) SetMsgFlagNames(*ImapMsgInfo, []string) (int, []string) DelFlagNamesFromMsg(*ImapMsgInfo, []string) (int, []string) GetName() string GetUsage() int GetUidValidity() uint64 GetCurrentMsgCount() uint64 GetUidNext() uint64 GetFirstUnseenNum() uint64 CheckRecent(keepRecent bool) uint64 GetReaderWriterForNewMessage() (MessageReaderWriter, error) AddMsg(MessageReaderWriter, time.Time) (string, error) AddFolder(string) GetFolder(string) ImapFolder RemoveFolder(string) error RenameFolder(string, string) error ExpungeReturnNums() []uint64 GetSystemFolders() []string GetIMAPDefaultFolders() map[string]string GetSearchIter(string, bool) ImapSearchIter GetFetchIter(string, string, bool) ImapFetchIter GetStoreIter(string, string, string, bool, bool) ImapStoreFlagsIter CopyTo(string, int, int, int, ImapFolder, bool) error ListFolders() []string ExistingFlags() []string SetReadOnly(bool) IsReadOnly() bool }
type ImapIterator ¶
type ImapIterator interface { Next() bool Close() }
type ImapMboxInfo ¶
type ImapMboxInfo struct {
Recent, Unseen, Exists, Uidnext, Uidvalidity uint64
}
type ImapMessage ¶
type ImapMessage interface { SetInfo(*ImapMsgInfo) GetInfo() *ImapMsgInfo GetPartBySectionNum(partN []int) ImapMessage GetAsBytes() []byte GetBody() ([]byte, error) GetHeader() ImapMessageHeader IsMultipart() bool MultipartReader() ImapMessageMultipartReader Close() error }
type ImapMessageHeader ¶
type ImapMessageHeaderFields ¶
type ImapMessageHeaderFields interface { Next() bool Raw() ([]byte, error) Key() string Value() string }
-----------------------------------------------------------------------------
type ImapMessageMultipartReader ¶
type ImapMessageMultipartReader interface {
NextPart() (ImapMessage, error)
}
type ImapMsgInfo ¶
type ImapMsgInfo struct { Uid uint64 Num uint64 Mid string Date int64 Size int64 Params map[string]string }
-----------------------------------------------------------------------------
type ImapMsgInfoIter ¶
type ImapMsgInfoIter interface { ImapIterator Val() *ImapMsgInfo }
type ImapNumSetIter ¶
type ImapNumSetIter interface { Next() bool Val() *ImapMsgInfo Valid() bool Close() }
type ImapSearchIter ¶
type ImapSearchIter interface { ImapIterator Val() uint64 }
type ImapSetRange ¶
type ImapStoreFlagsIter ¶
type ImapStoreFlagsIter interface { ImapIterator Val() (uint64, string, error) }
type ImapSubscription ¶
type MailStorage ¶ added in v1.1.2
type MailstoragePlugin ¶
type MessageReaderWriter ¶
type MessageReaderWriter interface { FileName() string Name() string // путь до файла, как был передан при открытии Read(p []byte) (n int, err error) ReadAll() ([]byte, error) Seek(offset int64, whence int) (int64, error) Write([]byte) (int, error) Sync() error Close() error ReOpen() error Destroy() error GetFlags() []string SetFlags([]string) Params() map[string]interface{} }
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
type Plugin ¶
type Plugin interface { Init(context.Context) bool SetSettingsDb(SettingsDbPlugin) GetName() string GetPType() int GetDesc() string GetVersion() string GetEmptySettings() []interface{} GetSettings(string) []interface{} SetSettings(string, map[string]string) DelSettings(string) error WebExists() bool Web(string, string, map[string]string) (interface{}, error) }
type PluginEngine ¶ added in v1.1.2
type QueueItem ¶
type QueueItem struct { QId string RetryCount int LastTryTimestamp int64 MessageId string Helo string Ip string Tls bool RecvTimestamp int64 SenderEmail string RcptEmail string }
-----------------------------------------------------------------------------
type QueueMessage ¶
type RuleActionStruct ¶
type RuleActionStruct struct {
Actions [][]string
}
type RuleConditionStruct ¶
type RuleStruct ¶
type RuleStruct struct { Name string Condition *RuleConditionStruct Action *RuleActionStruct }
type SettingsDbPlugin ¶
type SettingsDbPlugin interface { Plugin Open(map[string]string) error SetString(string, string) error SetStringList(string, []string) error SetInt(string, int64) error SetIntList(string, []int64) error SetFloat(string, float64) error SetFloatList(string, []float64) error SetBool(string, bool) error GetString(string) string GetStringList(string) []string GetInt(string) int64 GetIntList(string) []int64 GetFloat(string) float64 GetFloatList(string) []float64 GetBool(string) bool Del(string) error StrListAppend(string, string) error StrListExclude(string, string) error StrListContains(string, string) bool IntListAppend(string, int64) error IntListExclude(string, int64) error IntListContains(string, int64) bool FloatListAppend(string, float64) error FloatListExclude(string, float64) error FloatListContains(string, float64) bool Close() }
type SmtpQueuePlugin ¶
type SmtpQueuePlugin interface { Plugin Open() error GetTempReaderWriter() MessageReaderWriter GetNewMsgReaderWriter() MessageReaderWriter AddMessageForRcpt(string, []byte, *QueueMessage) error GetQueueItems() []*QueueItem GetQueueItemReaderWriter(string) MessageReaderWriter DeleteQueueItem(string) UpdateQueueRetry(string, int, int64) GetAsImapMessage(io.Reader) ImapMessage IsSeen(string, string) bool MarkAsSeen(string, string) error Close() }
type UserDBPlugin ¶
Click to show internal directories.
Click to hide internal directories.