Versions in this module Expand all Collapse all v0 v0.1.0 Feb 28, 2021 Changes in this version + var ErrWrongAddressPassword = errors.New("wrong address or password combination") + type Addressbook interface + Lookup func(context.Context, models.Address) (*LookupResult, error) + LookupTx func(context.Context, database.Queryer, models.Address) (*LookupResult, error) + func NewAddressbook(db database.Conn, domainDao database.DomainDao, mailboxDao database.MailboxDao) Addressbook + type Authenticator interface + Auth func(ctx context.Context, name, pass []byte) (*models.MailboxEntity, error) + func NewAuthenticator(db database.Conn, mailboxCredentialDao database.MailboxCredentialDao, ...) Authenticator + type Cleaner interface + Clean func(ctx context.Context) error + func NewCleaner(db database.Conn, mailDao database.MailDao, blobs storage.Blobs) Cleaner + type Courier struct + func NewCourier(db database.Conn, mailDao database.MailDao, recipientDao database.RecipientDao, ...) *Courier + func (c *Courier) SendMail(ctx context.Context, mail *models.MailEntity) (SendResult, error) + type Envelope struct + Addr net.IP + Date time.Time + From models.Address + Helo string + To []models.Address + type Inbox struct + Mails []models.MailEntity + func (i *Inbox) Count() int + func (i *Inbox) IsMarked(index int) bool + func (i *Inbox) Mail(index int) (models.MailEntity, bool) + func (i *Inbox) Mark(index int) + func (i *Inbox) Reset() + func (i *Inbox) Size() int64 + type Inboxer struct + func NewInboxer(db database.Conn, cleaner Cleaner) *Inboxer + func (i *Inboxer) Commit(ctx context.Context, mailbox *models.MailboxEntity, inbox *Inbox) error + func (i *Inboxer) Inbox(ctx context.Context, mailbox *models.MailboxEntity) (*Inbox, error) + type LookupResult struct + Address models.Address + IsLocal bool + Mailbox *models.MailboxEntity + type Mailman struct + func NewMailman(db database.Conn, mailDao database.MailDao, recipientDao database.RecipientDao, ...) *Mailman + func (m *Mailman) Deliver(ctx context.Context, envelope Envelope, content io.Reader) error + type Queue struct + func NewQueue(db database.Conn, mailDao database.MailDao, courier *Courier, cleaner Cleaner) (*Queue, error) + func (q *Queue) WakeUp(ctx context.Context) + type SendResult int + const SomeFailed + const SomePending + const SomeSuccess