Documentation
¶
Index ¶
- type Backend
- type Mailbox
- func (m *Mailbox) Check() error
- func (m *Mailbox) CopyMessages(uid bool, seqSet *imap.SeqSet, dest string) error
- func (m *Mailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error
- func (m *Mailbox) Expunge() error
- func (m *Mailbox) Info() (*imap.MailboxInfo, error)
- func (m *Mailbox) ListMessages(uid bool, seqSet *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
- func (m *Mailbox) Name() string
- func (m *Mailbox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)
- func (m *Mailbox) SetSubscribed(subscribed bool) error
- func (m *Mailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
- func (m *Mailbox) UpdateMessagesFlags(uid bool, seqSet *imap.SeqSet, operation imap.FlagsOp, flags []string) error
- type Server
- type User
- func (u *User) CreateMailbox(name string) error
- func (u *User) DeleteMailbox(name string) error
- func (u *User) GetMailbox(name string) (backend.Mailbox, error)
- func (u *User) ListMailboxes(subscribed bool) ([]backend.Mailbox, error)
- func (u *User) Logout() error
- func (u *User) RenameMailbox(oldName, newName string) error
- func (u *User) Username() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements IMAP backend interface
func NewBackend ¶
func NewBackend( userService service.UserServiceInterface, mailboxService service.MailboxServiceInterface, messageService service.MessageServiceInterface, domainRepo repository.DomainRepository, rateLimiter *ratelimit.Limiter, bruteForce *bruteforce.Protection, totpService *totp.TOTPService, logger *zap.Logger, ) *Backend
NewBackend creates a new IMAP backend with all dependencies
type Mailbox ¶
type Mailbox struct {
// contains filtered or unexported fields
}
Mailbox implements IMAP mailbox interface
func (*Mailbox) CopyMessages ¶
CopyMessages copies messages to another mailbox
func (*Mailbox) CreateMessage ¶
CreateMessage appends a new message to the mailbox
func (*Mailbox) Info ¶
func (m *Mailbox) Info() (*imap.MailboxInfo, error)
Info returns mailbox information
func (*Mailbox) ListMessages ¶
func (m *Mailbox) ListMessages(uid bool, seqSet *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
ListMessages lists messages in the mailbox
func (*Mailbox) SearchMessages ¶
SearchMessages searches for messages matching criteria
func (*Mailbox) SetSubscribed ¶
SetSubscribed sets the subscription status
func (*Mailbox) Status ¶
func (m *Mailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
Status returns mailbox status
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server manages IMAP server instances
func NewServer ¶
func NewServer(cfg *config.IMAPConfig, tlsCfg *tls.Config, backend *Backend, logger *zap.Logger) *Server
NewServer creates a new IMAP server manager
type User ¶
type User struct {
// contains filtered or unexported fields
}
User implements IMAP user interface
func (*User) CreateMailbox ¶
CreateMailbox creates a new mailbox
func (*User) DeleteMailbox ¶
DeleteMailbox deletes a mailbox
func (*User) GetMailbox ¶
GetMailbox retrieves a specific mailbox
func (*User) ListMailboxes ¶
ListMailboxes lists user's mailboxes
func (*User) RenameMailbox ¶
RenameMailbox renames a mailbox