Versions in this module Expand all Collapse all v0 v0.6.0 Jun 30, 2016 Changes in this version + const MessageError + const MessagePermit + const MessageReject + const MessageTempFail + const QUOTA_FACTOR_CLIENT_ADDRESS + const QUOTA_FACTOR_RECIPIENT + const QUOTA_FACTOR_RECIPIENT_DOMAIN + const QUOTA_FACTOR_SASL_USERNAME + const QUOTA_FACTOR_SENDER + const QUOTA_FACTOR_SENDER_DOMAIN + var BounceHandlerSaveBounceReportStmt = *new(*sql.Stmt) + var BounceHandlerSaveBounceStmt = *new(*sql.Stmt) + var Config = *new(config) + var ErrIntOverflowCluegetter = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthCluegetter = fmt.Errorf("proto: negative length found during unmarshaling") + var Log *log.Logger + var MessageInsertHeaders = make([]MessageHeader, 0) + var MessageModuleGroups = make([]*MessageModuleGroup, 0) + var MessageStmtInsertModuleResult = *new(*sql.Stmt) + var MessageStmtInsertMsg = *new(*sql.Stmt) + var MessageStmtInsertMsgBody = *new(*sql.Stmt) + var MessageStmtInsertMsgHdr = *new(*sql.Stmt) + var MessageStmtInsertMsgRcpt = *new(*sql.Stmt) + var MessageStmtInsertRcpt = *new(*sql.Stmt) + var MessageStmtPruneBody = *new(*sql.Stmt) + var MessageStmtPruneHeader = *new(*sql.Stmt) + var MessageStmtPruneMessage = *new(*sql.Stmt) + var MessageStmtPruneMessageQuota = *new(*sql.Stmt) + var MessageStmtPruneMessageRecipient = *new(*sql.Stmt) + var MessageStmtPruneMessageResult = *new(*sql.Stmt) + var MessageStmtPruneRecipient = *new(*sql.Stmt) + var MessageStmtPruneSession = *new(*sql.Stmt) + var MilterDataIndex milterDataIndex + var Proto_Message_Verdict_name = map[int32]string + var Proto_Message_Verdict_value = map[string]int32 + var QuotaGetAllQuotasStmt = *new(*sql.Stmt) + var QuotaGetAllRegexesStmt = *new(*sql.Stmt) + var Rdbms *sql.DB + var RedisLPushChan chan *RedisKeyValue + var StatsControl = make(chan struct{}) + var StatsCounters = make(map[string]*StatsCounter) + var StatsCountersMutex = &sync.Mutex + func CluegetterRecover(funcName string) + func DaemonReset() + func DefaultConfig(cfg *config) + func GetNewConfig() *config + func HttpParseFilterInstance(r *http.Request) (out []string, err error) + func HttpRenderOutput(w http.ResponseWriter, r *http.Request, templateFile string, ...) + func LoadConfig(cfgFile string, cfg *config) + func LuaReset() + func LuaStart() + func MilterAddRcpt(sess *MilterSession, rcpt string) int + func MilterChangeFrom(sess *MilterSession, from string) + func MilterDelRcpt(sess *MilterSession, rcpt string) int + func ModuleRegister(module Module) + func RdbmsRowsInTable(table string) (count int) + func SetConfig(config *config) + type BaseModule struct + func (m *BaseModule) HttpHandlers() map[string]HttpCallback + func (m *BaseModule) Init() + func (m *BaseModule) Ipc() map[string]func(string) + func (m *BaseModule) MessageCheck(msg *Message, done chan bool) *MessageCheckResult + func (m *BaseModule) RecipientCheck(rcpt *address.Address) (verdict int, msg string) + func (m *BaseModule) Rpc() map[string]chan string + func (m *BaseModule) SessionDisconnect(s *MilterSession) + func (m *BaseModule) Stop() + type Cluegetter struct + Config config + Log *log.Logger + Redis RedisClient + func InitCg() *Cluegetter + func (cg *Cluegetter) Instance() uint + func (cg *Cluegetter) Module(name, caller string) *Module + func (cg *Cluegetter) Modules() []Module + func (cg *Cluegetter) Rdbms() *sql.DB + type ConfigHttpFrontend struct + Enable_Proxy_Protocol bool + Enabled bool + Listen_Host string + Listen_Port string + type ConfigLuaModule struct + Enabled bool + Script string + ScriptContents string + type ConfigModuleGroup struct + Module []string + type HttpCallback func(w http.ResponseWriter, r *http.Request) + type HttpMessage struct + BodySize uint32 + BodySizeStr string + CertIssuer string + CertSubject string + CheckResults []*HttpMessageCheckResult + Cipher string + CipherBits string + Date *time.Time + Headers []*HttpMessageHeader + Helo string + Id string + Ip string + MtaDaemonName string + MtaHostname string + RcptCount int + Recipients []*HttpMessageRecipient + RejectScore float64 + RejectScoreThreshold float64 + ReverseDns string + SaslMethod string + SaslUsername string + ScoreCombined float64 + Sender string + SessionId string + TempfailScore float64 + TempfailScoreThreshold float64 + TlsVersion string + Verdict string + VerdictMsg string + type HttpMessageCheckResult struct + Determinants string + Duration float64 + Module string + Score float64 + Verdict string + WeightedScore float64 + type HttpMessageHeader struct + Body string + Name string + type HttpMessageRecipient struct + Domain string + Email string + Id int + Local string + type HttpViewData struct + Config *config + func HttpGetViewData() *HttpViewData + type Message struct + Body []byte + BodyHash string + BodySize int + CheckResults []*MessageCheckResult + Date time.Time + From *address.Address + Headers []MessageHeader + QueueId string + Rcpt []*address.Address + RejectScore float64 + RejectScoreThreshold float64 + TempfailScore float64 + TempfailScoreThreshold float64 + Verdict int + VerdictMsg string + func (msg *Message) GetHeader(key string, includeDeleted bool) []MessageHeader + func (msg *Message) Session() *MilterSession + func (msg *Message) SetSession(s *MilterSession) + func (msg *Message) String() []byte + type MessageCheckResult struct + Callbacks []*func(*Message, int) + Determinants map[string]interface{} + Duration time.Duration + Message string + Module string + Score float64 + SuggestedAction int + WeightedScore float64 + func LuaMilterCheck(luaModuleName string, msg *Message, done chan bool) *MessageCheckResult + func (cr *MessageCheckResult) MarshalJSON() ([]byte, error) + type MessageHeader struct + Key string + Value string + type MessageModuleGroup struct + type MessageModuleGroupMember struct + type MilterSession struct + CertIssuer string + CertSubject string + Cipher string + CipherBits uint32 + DateConnect time.Time + DateDisconnect time.Time + Helo string + Hostname string + Instance uint + Ip string + Messages []*Message + MtaDaemonName string + MtaHostName string + ReverseDns string + SaslMethod string + SaslSender string + SaslUsername string + TlsVersion string + func (s *MilterSession) Id() []byte + func (s *MilterSession) IdArray() [16]byte + func (s *MilterSession) SetId(id [16]byte) + type Module interface + Enable func() bool + HttpHandlers func() map[string]HttpCallback + Init func() + Ipc func() map[string]func(string) + MessageCheck func(msg *Message, done chan bool) *MessageCheckResult + Name func() string + RecipientCheck func(rcpt *address.Address) (verdict int, msg string) + Rpc func() map[string]chan string + SessionDisconnect func(s *MilterSession) + SetCluegetter func(*Cluegetter) + Stop func() + type ModuleOld struct + func (m *ModuleOld) Enable() bool + func (m *ModuleOld) HttpHandlers() map[string]HttpCallback + func (m *ModuleOld) Init() + func (m *ModuleOld) Ipc() map[string]func(string) + func (m *ModuleOld) MessageCheck(msg *Message, done chan bool) *MessageCheckResult + func (m *ModuleOld) Name() string + func (m *ModuleOld) RecipientCheck(rcpt *address.Address) (verdict int, msg string) + func (m *ModuleOld) Rpc() map[string]chan string + func (m *ModuleOld) SetCluegetter(cg *Cluegetter) + func (m *ModuleOld) Stop() + type NullTime struct + Valid bool + func (nt *NullTime) Scan(value interface{}) error + func (nt NullTime) Value() (driver.Value, error) + type Proto_Message struct + Body []byte + CheckResults []*Proto_Message_CheckResult + From string + Headers []*Proto_Message_Header + Id string + Rcpt []string + RejectScore float64 + RejectScoreThreshold float64 + Session *Proto_Session + TempfailScore float64 + TempfailScoreThreshold float64 + Verdict Proto_Message_Verdict + VerdictMsg string + func (*Proto_Message) Descriptor() ([]byte, []int) + func (*Proto_Message) ProtoMessage() + func (m *Proto_Message) GetCheckResults() []*Proto_Message_CheckResult + func (m *Proto_Message) GetHeaders() []*Proto_Message_Header + func (m *Proto_Message) GetSession() *Proto_Session + func (m *Proto_Message) Marshal() (data []byte, err error) + func (m *Proto_Message) MarshalTo(data []byte) (int, error) + func (m *Proto_Message) Reset() + func (m *Proto_Message) Size() (n int) + func (m *Proto_Message) String() string + func (m *Proto_Message) Unmarshal(data []byte) error + type Proto_Message_CheckResult struct + Determinants []byte + Duration float64 + MessageId string + Module string + Score float64 + Verdict Proto_Message_Verdict + WeightedScore float64 + func (*Proto_Message_CheckResult) Descriptor() ([]byte, []int) + func (*Proto_Message_CheckResult) ProtoMessage() + func (m *Proto_Message_CheckResult) Marshal() (data []byte, err error) + func (m *Proto_Message_CheckResult) MarshalTo(data []byte) (int, error) + func (m *Proto_Message_CheckResult) Reset() + func (m *Proto_Message_CheckResult) Size() (n int) + func (m *Proto_Message_CheckResult) String() string + func (m *Proto_Message_CheckResult) Unmarshal(data []byte) error + type Proto_Message_Header struct + Key string + Value string + func (*Proto_Message_Header) Descriptor() ([]byte, []int) + func (*Proto_Message_Header) ProtoMessage() + func (m *Proto_Message_Header) Marshal() (data []byte, err error) + func (m *Proto_Message_Header) MarshalTo(data []byte) (int, error) + func (m *Proto_Message_Header) Reset() + func (m *Proto_Message_Header) Size() (n int) + func (m *Proto_Message_Header) String() string + func (m *Proto_Message_Header) Unmarshal(data []byte) error + type Proto_Message_Verdict int32 + const Proto_Message_ERROR + const Proto_Message_PERMIT + const Proto_Message_REJECT + const Proto_Message_TEMPFAIL + func (Proto_Message_Verdict) EnumDescriptor() ([]byte, []int) + func (x Proto_Message_Verdict) String() string + type Proto_Session struct + CertIssuer string + CertSubject string + Cipher string + CipherBits uint32 + Helo string + Hostname string + Id []byte + InstanceId uint64 + Ip string + MtaDaemonName string + MtaHostName string + ReverseDns string + SaslMethod string + SaslSender string + SaslUsername string + TimeEnd uint64 + TimeStart uint64 + TlsVersion string + func (*Proto_Session) Descriptor() ([]byte, []int) + func (*Proto_Session) ProtoMessage() + func (m *Proto_Session) Marshal() (data []byte, err error) + func (m *Proto_Session) MarshalTo(data []byte) (int, error) + func (m *Proto_Session) Reset() + func (m *Proto_Session) Size() (n int) + func (m *Proto_Session) String() string + func (m *Proto_Session) Unmarshal(data []byte) error + type RedisClient interface + PSubscribe func(patterns ...string) (*redis.PubSub, error) + Publish func(channel, message string) *redis.IntCmd + type RedisClientBase interface + Del func(keys ...string) *redis.IntCmd + Eval func(string, []string, []string) *redis.Cmd + EvalSha func(sha1 string, keys []string, args []string) *redis.Cmd + Exists func(key string) *redis.BoolCmd + Expire func(key string, expiration time.Duration) *redis.BoolCmd + Get func(key string) *redis.StringCmd + HGetAllMap func(key string) *redis.StringStringMapCmd + HSet func(key, field, value string) *redis.BoolCmd + LPush func(key string, values ...string) *redis.IntCmd + LPushX func(key, value interface{}) *redis.IntCmd + LRange func(key string, start, stop int64) *redis.StringSliceCmd + LSet func(key string, index int64, value interface{}) *redis.StatusCmd + Ping func() *redis.StatusCmd + RPop func(key string) *redis.StringCmd + SAdd func(key string, members ...string) *redis.IntCmd + SMembers func(key string) *redis.StringSliceCmd + ScriptExists func(scripts ...string) *redis.BoolSliceCmd + ScriptLoad func(script string) *redis.StringCmd + Set func(key string, value interface{}, expiration time.Duration) *redis.StatusCmd + SetNX func(key string, value interface{}, expiration time.Duration) *redis.BoolCmd + ZAdd func(key string, members ...redis.Z) *redis.IntCmd + ZCount func(key, min, max string) *redis.IntCmd + ZRemRangeByScore func(key, min, max string) *redis.IntCmd + type RedisClientMulti interface + Exec func(f func() error) ([]redis.Cmder, error) + type RedisKeyValue struct + type Rpc struct + Bayes_Learn_Message *Rpc__Bayes_Learn_Message + Bayes_Learn_Message_Id *Rpc__Bayes_Learn_Message_Id + Name string + func (*Rpc) Descriptor() ([]byte, []int) + func (*Rpc) ProtoMessage() + func (m *Rpc) GetBayes_Learn_Message() *Rpc__Bayes_Learn_Message + func (m *Rpc) GetBayes_Learn_Message_Id() *Rpc__Bayes_Learn_Message_Id + func (m *Rpc) Marshal() (data []byte, err error) + func (m *Rpc) MarshalTo(data []byte) (int, error) + func (m *Rpc) Reset() + func (m *Rpc) Size() (n int) + func (m *Rpc) String() string + func (m *Rpc) Unmarshal(data []byte) error + type Rpc__Bayes_Learn_Message struct + Host string + IsSpam bool + Message *Proto_Message + Reason string + Reporter string + func (*Rpc__Bayes_Learn_Message) Descriptor() ([]byte, []int) + func (*Rpc__Bayes_Learn_Message) ProtoMessage() + func (m *Rpc__Bayes_Learn_Message) GetMessage() *Proto_Message + func (m *Rpc__Bayes_Learn_Message) Marshal() (data []byte, err error) + func (m *Rpc__Bayes_Learn_Message) MarshalTo(data []byte) (int, error) + func (m *Rpc__Bayes_Learn_Message) Reset() + func (m *Rpc__Bayes_Learn_Message) Size() (n int) + func (m *Rpc__Bayes_Learn_Message) String() string + func (m *Rpc__Bayes_Learn_Message) Unmarshal(data []byte) error + type Rpc__Bayes_Learn_Message_Id struct + Host string + IsSpam bool + MessageId string + Reason string + Reporter string + func (*Rpc__Bayes_Learn_Message_Id) Descriptor() ([]byte, []int) + func (*Rpc__Bayes_Learn_Message_Id) ProtoMessage() + func (m *Rpc__Bayes_Learn_Message_Id) Marshal() (data []byte, err error) + func (m *Rpc__Bayes_Learn_Message_Id) MarshalTo(data []byte) (int, error) + func (m *Rpc__Bayes_Learn_Message_Id) Reset() + func (m *Rpc__Bayes_Learn_Message_Id) Size() (n int) + func (m *Rpc__Bayes_Learn_Message_Id) String() string + func (m *Rpc__Bayes_Learn_Message_Id) Unmarshal(data []byte) error + type SessionConfig struct + Clamav struct{ ... } + ClueGetter struct{ ... } + Contacts struct{ ... } + Greylisting struct{ ... } + Quotas struct{ ... } + Rspamd struct{ ... } + SpamAssassin struct{ ... } + type StatsCounter struct