Versions in this module Expand all Collapse all v0 v0.0.11 Apr 30, 2024 Changes in this version + var ErrFromID = errors.New("fromid not unique") + func Fail(ctx context.Context, log mlog.Log, f Filter) (affected int, err error) + func HoldRuleRemove(ctx context.Context, log mlog.Log, holdRuleID int64) error + func HoldSet(ctx context.Context, filter Filter, hold bool) (affected int, err error) + func HookCancel(ctx context.Context, log mlog.Log, filter HookFilter) (affected int, err error) + func HookNextAttemptAdd(ctx context.Context, filter HookFilter, d time.Duration) (affected int, err error) + func HookNextAttemptSet(ctx context.Context, filter HookFilter, t time.Time) (affected int, err error) + func HookPost(ctx context.Context, log mlog.Log, hookID int64, attempt int, ...) (code int, response string, err error) + func HookQueueSize(ctx context.Context) (int, error) + func Incoming(ctx context.Context, log mlog.Log, acc *store.Account, messageID string, ...) error + func NextAttemptAdd(ctx context.Context, filter Filter, d time.Duration) (affected int, err error) + func NextAttemptSet(ctx context.Context, filter Filter, t time.Time) (affected int, err error) + func RequireTLSSet(ctx context.Context, filter Filter, requireTLS *bool) (affected int, err error) + func SuppressionAdd(ctx context.Context, originalAddress smtp.Path, sup *webapi.Suppression) error + func SuppressionList(ctx context.Context, account string) ([]webapi.Suppression, error) + func SuppressionLookup(ctx context.Context, account string, address smtp.Path) (*webapi.Suppression, error) + func SuppressionRemove(ctx context.Context, account string, address smtp.Path) error + func TransportSet(ctx context.Context, filter Filter, transport string) (affected int, err error) + type Filter struct + Account string + From string + Hold *bool + IDs []int64 + Max int + NextAttempt string + Submitted string + To string + Transport *string + type HoldRule struct + Account string + ID int64 + RecipientDomain dns.Domain + RecipientDomainStr string + SenderDomain dns.Domain + SenderDomainStr string + func HoldRuleAdd(ctx context.Context, log mlog.Log, hr HoldRule) (HoldRule, error) + func HoldRuleList(ctx context.Context) ([]HoldRule, error) + func (pr HoldRule) All() bool + type Hook struct + Account string + Attempts int + Authorization string + Extra map[string]string + FromID string + ID int64 + IsIncoming bool + MessageID string + NextAttempt time.Time + OutgoingEvent string + Payload string + QueueMsgID int64 + Results []HookResult + Subject string + Submitted time.Time + URL string + func HookList(ctx context.Context, filter HookFilter, sort HookSort) ([]Hook, error) + func (h Hook) LastResult() HookResult + func (h Hook) Retired(success bool, lastActivity, keepUntil time.Time) HookRetired + type HookFilter struct + Account string + Event string + IDs []int64 + Max int + NextAttempt string + Submitted string + type HookResult struct + Code int + Duration time.Duration + Error string + Response string + Start time.Time + Success bool + URL string + type HookRetired struct + Account string + Attempts int + Authorization bool + Extra map[string]string + FromID string + ID int64 + IsIncoming bool + KeepUntil time.Time + LastActivity time.Time + MessageID string + OutgoingEvent string + Payload string + QueueMsgID int64 + Results []HookResult + Subject string + Submitted time.Time + Success bool + SupersededByID int64 + URL string + func HookRetiredList(ctx context.Context, filter HookRetiredFilter, sort HookRetiredSort) ([]HookRetired, error) + func (h HookRetired) LastResult() HookResult + type HookRetiredFilter struct + Account string + Event string + IDs []int64 + LastActivity string + Max int + Submitted string + type HookRetiredSort struct + Asc bool + Field string + Last any + LastID int64 + type HookSort struct + Asc bool + Field string + Last any + LastID int64 type Msg + Extra map[string]string + FromID string + Hold bool + Results []MsgResult + SenderDomainStr string + Subject string + func (m *Msg) LastResult() MsgResult + func (m Msg) Retired(success bool, t, keepUntil time.Time) MsgRetired + type MsgResult struct + Code int + Duration time.Duration + Error string + Secode string + Start time.Time + Success bool + type MsgRetired struct + Attempts int + BaseID int64 + DialedIPs map[string][]net.IP + Extra map[string]string + FromID string + FutureReleaseRequest string + Has8bit bool + ID int64 + IsDMARCReport bool + IsTLSReport bool + KeepUntil time.Time + LastActivity time.Time + LastAttempt *time.Time + MaxAttempts int + MessageID string + Queued time.Time + RecipientAddress string + RecipientDomain dns.IPDomain + RecipientDomainStr string + RecipientLocalpart smtp.Localpart + RequireTLS *bool + Results []MsgResult + SMTPUTF8 bool + SenderAccount string + SenderDomainStr string + SenderLocalpart smtp.Localpart + Size int64 + Subject string + Success bool + Transport string + func RetiredList(ctx context.Context, filter RetiredFilter, sort RetiredSort) ([]MsgRetired, error) + func (m MsgRetired) LastResult() MsgResult + func (m MsgRetired) Recipient() smtp.Path + func (m MsgRetired) Sender() (path smtp.Path, err error) + type RetiredFilter struct + Account string + From string + IDs []int64 + LastActivity string + Max int + Submitted string + Success *bool + To string + Transport *string + type RetiredSort struct + Asc bool + Field string + Last any + LastID int64 + type Sort struct + Asc bool + Field string + Last any + LastID int64 v0.0.10 Mar 9, 2024 Changes in this version + const FutureReleaseIntervalMax + func ConnectionCounter() int64 type Msg + BaseID int64 + FutureReleaseRequest string v0.0.9 Jan 9, 2024 v0.0.8 Nov 22, 2023 Changes in this version + func SaveRequireTLS(ctx context.Context, id int64, requireTLS *bool) error type Msg + IsDMARCReport bool + IsTLSReport bool + MaxAttempts int + RequireTLS *bool + func MakeMsg(senderAccount string, sender, recipient smtp.Path, has8bit, smtputf8 bool, ...) Msg v0.0.7 Sep 24, 2023 v0.0.6 Aug 16, 2023 Changes in this version type Msg + MessageID string v0.0.5 Jul 3, 2023 Changes in this version type Msg + Transport string v0.0.4 Jun 4, 2023 Changes in this version + var DB *bstore.DB + var DBTypes = []any v0.0.3 Apr 22, 2023 Changes in this version + var Localserve bool + type ReadReaderAtCloser interface v0.0.2 Mar 6, 2023 v0.0.1 Feb 17, 2023 Changes in this version + func Add(log *mlog.Log, senderAccount string, mailFrom, rcptTo smtp.Path, ...) error + func Count() (int, error) + func Drop(ID int64, toDomain string, recipient string) (int, error) + func Init() error + func Kick(ID int64, toDomain string, recipient string) (int, error) + func OpenMessage(id int64) (io.ReadCloser, error) + func Shutdown() + func Start(resolver dns.Resolver, done chan struct{}) error + type Msg struct + Attempts int + DSNUTF8 []byte + DialedIPs map[string][]net.IP + Has8bit bool + ID int64 + LastAttempt *time.Time + LastError string + MsgPrefix []byte + NextAttempt time.Time + Queued time.Time + RecipientDomain dns.IPDomain + RecipientDomainStr string + RecipientLocalpart smtp.Localpart + SMTPUTF8 bool + SenderAccount string + SenderDomain dns.IPDomain + SenderLocalpart smtp.Localpart + Size int64 + func List() ([]Msg, error) + func (m Msg) MessagePath() string + func (m Msg) Recipient() smtp.Path + func (m Msg) Sender() smtp.Path