Documentation ¶
Index ¶
- Variables
- type BounceCreated
- type CleanupMessageAccepted
- type CleanupMilterReject
- type DovecotAuthFailedWithReason
- type LightmeterDumpedHeader
- type LightmeterRelayedBounce
- type PayloadType
- type Pickup
- type QmgrMailQueued
- type QmgrMessageExpired
- type QmgrRemoved
- type RawHeader
- type RawPayload
- type RawSmtpSentStatus
- type SmtpSentStatusExtraMessageNewUUID
- type SmtpSentStatusExtraMessageSentQueued
- type SmtpdConnect
- type SmtpdDisconnect
- type SmtpdDisconnectStat
- type SmtpdMailAccepted
- type SmtpdReject
- type TimeFormat
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHeaderLine = errors.New("Could not parse header") ErrUnsupportedLogLine = errors.New("Unsupported payload") )
Functions ¶
This section is empty.
Types ¶
type BounceCreated ¶
type CleanupMessageAccepted ¶
type CleanupMilterReject ¶
type LightmeterDumpedHeader ¶
type LightmeterRelayedBounce ¶
type PayloadType ¶
type PayloadType int
const ( PayloadTypeUnsupported PayloadType = iota PayloadTypeQmgrMessageExpired PayloadTypeQmgrMailQueued PayloadTypeQmgrRemoved PayloadTypeSmtpMessageStatus PayloadTypeSmtpdConnect PayloadTypeSmtpdDisconnect PayloadTypeSmtpdMailAccepted PayloadTypeSmtpdReject PayloadTypeCleanupMessageAccepted PayloadTypeBounceCreated PayloadTypePickup PayloadTypeCleanupMilterReject PayloadTypeVersion PayloadTypeDovecotAuthFailedWithReason PayloadTypeLightmeterDumpedHeader PayloadTypeLightmeterRelayedBounce // types for SmtpMessageStatus extra message PayloadTypeSmtpMessageStatusSentQueued PayloadSmtpSentStatusExtraMessageNewUUID )
type QmgrMailQueued ¶
type QmgrMessageExpired ¶
type QmgrRemoved ¶
type QmgrRemoved struct {
Queue string
}
type RawHeader ¶
type RawHeader struct { Time timeutil.RawTime Host string Process string Daemon string ProcessIP string ProcessID string }
func ParseHeaderWithCustomTimeFormat ¶
func ParseHeaderWithCustomTimeFormat(logLine string, format TimeFormat) (RawHeader, int, error)
type RawPayload ¶
type RawPayload struct { PayloadType PayloadType RawSmtpSentStatus RawSmtpSentStatus QmgrMessageExpired QmgrMessageExpired QmgrMailQueued QmgrMailQueued QmgrRemoved QmgrRemoved SmtpdConnect SmtpdConnect SmtpdDisconnect SmtpdDisconnect SmtpdMailAccepted SmtpdMailAccepted SmtpdReject SmtpdReject CleanupMesageAccepted CleanupMessageAccepted CleanupMilterReject CleanupMilterReject BounceCreated BounceCreated Pickup Pickup Version Version DovecotAuthFailedWithReason DovecotAuthFailedWithReason LightmeterDumpedHeader LightmeterDumpedHeader LightmeterRelayedBounce LightmeterRelayedBounce }
NOTE: Go does not have unions, and using interfaces implies on virtual calls (which are being done in the higher level parsing interface, anyways), so we add all the possible payloads inlined in the struct, with a field describing which payload the whole record refers to. This is ok as all payloads here store basically byte slices only, which are trivially constructible and copyable so, although this struct will grow as newer payloads are supported, copying will perform better than using virtual calls
func ParsePayload ¶
func ParsePayload(payloadLine string, daemon, process string) (RawPayload, error)
type RawSmtpSentStatus ¶
type RawSmtpSentStatus struct { Queue string RecipientLocalPart string RecipientDomainPart string OrigRecipientLocalPart string OrigRecipientDomainPart string RelayName string RelayIpOrPath string RelayPort string Delay string Delays [5]string Dsn string Status string ExtraMessage string // parsed extra message ExtraMessagePayloadType PayloadType ExtraMessageSmtpSentStatusSentQueued SmtpSentStatusExtraMessageSentQueued ExtraMessageSmtpSentStatusExtraMessageNewUUID SmtpSentStatusExtraMessageNewUUID }
type SmtpSentStatusExtraMessageNewUUID ¶
type SmtpSentStatusExtraMessageNewUUID struct {
ID string
}
type SmtpdConnect ¶
type SmtpdDisconnect ¶
type SmtpdDisconnect struct { Host string IP string Stats map[string]SmtpdDisconnectStat }
type SmtpdDisconnectStat ¶
type SmtpdMailAccepted ¶
type SmtpdReject ¶
type TimeFormat ¶
type TimeFormat = timeutil.TimeFormat
Source Files ¶
- bounce.go
- bounce.rl
- cleanup.go
- cleanup.rl
- dovecot.go
- dovecot.rl
- errors.go
- header.rl
- lightmeter_header.go
- lightmeter_header.rl
- lightmeter_relayed_bounce.rl
- lightmeter_relayed_bounces.go
- parser.go
- payload.go
- payload_types.go
- pickup.go
- pickup.rl
- qmgr.go
- qmgr.rl
- smtp.go
- smtp.rl
- smtpd.go
- smtpd.rl
- version.go
- version.rl
Click to show internal directories.
Click to hide internal directories.