-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.go
30 lines (24 loc) · 889 Bytes
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package msmtpd
import "crypto/tls"
const timeFormatForHeaders = "Mon, 02 Jan 2006 15:04:05 -0700 (MST)"
const lineLength = 76
// Karma related
const tlsHandshakeFailedHate = 1
const wrongCommandOrderPenalty = 1
const missingParameterPenalty = 1
const unknownCommandPenalty = 2
const tooManyRecipientsPenalty = 5
const malformedMessagePenalty = 5
const tooBigMessagePenalty = 5
const unknownRecipientPenalty = 1
const commandExecutedProperly = 3 // 3 - HELO/EHLO, 3 MAIL FROM, 3 RCPT TO, 3 DATA - good transaction is 12
// TLSVersions is used to pretty print TLS protocol version being used
var TLSVersions = map[uint16]string{
tls.VersionSSL30: "SSL3.0",
tls.VersionTLS10: "TLS1.0",
tls.VersionTLS11: "TLS1.1",
tls.VersionTLS12: "TLS1.2",
tls.VersionTLS13: "TLS1.3",
}
// SubjectFact is default name for fact key to store message Subject as string
const SubjectFact = "subject"