🗃️PolicySet

The data collection provided by the postfix server

The PolicySet type represents all data provided by the postfix server in a typed and self-descriptive manner. Once your policy server receives data from postfix the data will be internally processed and as a result, a PolicySet is created that is then provided as a pointer to the Handle() method of your Handler interface.

The PolicySet currently consists of the following properties and follows the Postfix documentation. Please check the Postfix docs on details to the properties.

type PolicySet struct {
	// Postfix version 2.1 and later
	Request           string
	ProtocolState     string
	ProtocolName      string
	HELOName          string
	QueueId           string
	Sender            string
	Recipient         string
	RecipientCount    uint64
	ClientAddress     net.IP
	ClientName        string
	ReverseClientName string
	Instance          string

	// Postfix version 2.2 and later
	SASLMethod       string
	SASLUsername     string
	SASLSender       string
	Size             uint64
	CCertSubject     string
	CCertIssuer      string
	CCertFingerprint string

	// Postfix version 2.3 and later
	EncryptionProtocol string
	EncryptionCipher   string
	EncryptionKeysize  uint64
	ETRNDomain         string

	// Postfix version 2.5 and later
	Stress bool

	// Postfix version 2.9 and later
	CCertPubkeyFingerprint string

	// Postfix version 3.0 and later
	ClientPort uint64

	// Postfix version 3.1 and later
	PolicyContext string

	// Postfix version 3.2 and later
	ServerAddress net.IP
	ServerPort    uint64

	// postfix-policy-server specific values
	PPSConnId string
}

Besides of all values provided by the Postfix server, pps adds some package specific values, that might be useful in your program. The list of pps-specific values currently is:

Property

Type

Description

PPSConnId

string

Each time Postfix connects to your policy service, a unique connection id is assigned

to it. The PPSConnId property represents

this string.

Note: Please keep in mind, that the Postfix

specifications require that a connection

can be re-used by Postfix. Therefore you

might see multiple PolicySets with the

same connection id.

Last updated