Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // QueueDb queue db connection QueueDb *xorm.Engine // StatusDb status db connection StatusDb *xorm.Engine )
View Source
var Config struct { QueueDbDialect string `toml:"QueueDbDialect"` QueueDbConnect string `toml:"QueueDbConnect"` StatusDbDialect string `toml:"StatusDbDialect"` StatusDbConnect string `toml:"StatusDbConnect"` Hostname string `toml:"Hostname"` AllowIP []string `toml:"AllowIP"` AllowDomains []string `toml:"AllowDomains"` SMTPListenAddr string `toml:"SMTPListenAddr"` MaxRepeatSend uint `toml:"MaxRepeatSend"` RepeatIntervalMinutes uint `toml:"RepeatIntervalMinutes"` SendStream uint `toml:"SendStream"` ResendStream uint `toml:"ResendStream"` Debug bool `toml:"Debug"` }
Config application config
Functions ¶
func AddToQueue ¶
func AddToQueue(messageType, messageID string, from smtpd.MailAddress, rcpts []smtpd.MailAddress, data []byte) error
AddToQueue add email to queue
func CheckAllow ¶
CheckAllow check right for IP and sender email domain
Types ¶
type Queue ¶
type Queue struct { ID uint64 `xorm:"serial pk autoincr 'id'"` CreatedAt time.Time `xorm:"created"` UpdatedAt time.Time `xorm:"updated"` MessageType string MessageID string `xorm:"'message_id'"` From string FromHostname string Rcpt string RcptHostname string Data string `xorm:"LONGTEXT 'data'"` Repeat uint LaterStatus string `xorm:"MEDIUMTEXT 'later_status'"` }
Queue queue email model
func GetRepeatQueue ¶
GetRepeatQueue get `limit` number emails for resend
Click to show internal directories.
Click to hide internal directories.