Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Directory string `json:"directory"` DisableSSLVerification bool `json:"disable-ssl-verification"` // Map domain names to DKIM config for that domain DKIMConfigs map[string]DKIMConfig `json:"dkim-configs"` }
Application configuration.
type DKIMConfig ¶
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Persistent connection to an SMTP host.
type HostStatus ¶
Host status information.
type Message ¶
type Message struct { Host string From string To []string // contains filtered or unexported fields }
Message metadata.
type Queue ¶
type Queue struct { Storage *Storage // contains filtered or unexported fields }
Mail queue managing the sending of messages to hosts.
func NewQueue ¶
Create a new message queue. Any undelivered messages on disk will be added to the appropriate queue.
type QueueStatus ¶
type QueueStatus struct { Uptime int `json:"uptime"` Hosts map[string]*HostStatus `json:"hosts"` }
Queue status information.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Manager for message metadata and body on disk. All methods are safe to call from multiple goroutines.
func NewStorage ¶
Create a Storage instance for the specified directory.
func (*Storage) DeleteMessage ¶
Delete the specified message. The message body is also deleted if no more messages exist.
func (*Storage) GetMessageBody ¶
func (s *Storage) GetMessageBody(m *Message) (io.ReadCloser, error)
Retreive a reader for the message body.
func (*Storage) LoadMessages ¶
Load messages from the storage directory. Any messages that could not be loaded are ignored.