Documentation ¶
Overview ¶
Package for managements postfix transport settings
Index ¶
- func CheckRelayDomain(relay_domains []string, to string) bool
- func GetHandler(postfix_configs_path, amavisd_configs_path string) httprouter.Handle
- func MapACL(RegexpMaps map[string]map[string]interface{}) string
- func MapACLTest(inputMap map[string]map[string]interface{}) string
- func MapArrayHashRegexpAmavis(hashString string) (map[string]interface{}, error)
- func MapRecipientScoreSenderAmavis(hashString string) (map[string]map[string]interface{}, error)
- func MapRegexpTable(RegexpMap map[string]interface{}) string
- func MapScoreMaps(inputMap map[string]map[string]interface{}) string
- func PostHandler(postfix_configs_path, amavisd_configs_path string) httprouter.Handle
- func SmartTestAmavis(from, to string, ...) (string, error)
- func ValidateACL(inputParams io.Reader, location string) (map[string]map[string]map[string]string, error)
- func ValidateACLReload(inputParams io.Reader) (string, error)
- func ValidateRegexpTable(inputParams io.Reader, location string) (string, error)
- func ValidateScoreMaps(inputParams io.Reader) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRelayDomain ¶
func GetHandler ¶
func GetHandler(postfix_configs_path, amavisd_configs_path string) httprouter.Handle
Get acl groups by names, via case conditions by url location
func MapACLTest ¶
Mapping test requests
func MapArrayHashRegexpAmavis ¶
Mapping amavis regexp function(new_RE) and hash type arrays:
[new_RE( [qr'^sexampleUser@example.lan' => 'BYPASS_ENCRYPTED'], [qr'^.*$' => 'DEFAULT'] )]; This hash and regexp format is perl-like
func MapRecipientScoreSenderAmavis ¶
Create map for recipient in format:
sexampleUser@example.lan: {priority: 0 senders: [{src: ya.lan, dst: +15, priority: 0}]}
func MapRegexpTable ¶
Mapping regexp lookup table to acl names format
func MapScoreMaps ¶
Convert this map:
sexampleUser@example.lan: {priority: 0 senders: [{src: ya.lan, dst: +15, priority: 0}]}
To usability score-map json:
{ "maps": [{ "recipient": "sexampleUser@example.lan", "priority": 0, "senders": [{ "priority": 0, "scores": "+15", "sender": ".dx.lan" }, { "priority": 1, "scores": "+15", "sender": "exampleUser.lan" }] }, { "recipient": "sexampleUser@example.lan", "priority": 1, "senders": [{ "priority": 0, "scores": "+15", "sender": ".dx.lan" }, { "priority": 1, "scores": "+15", "sender": "exampleUser.lan" }] } ] }
func PostHandler ¶
func PostHandler(postfix_configs_path, amavisd_configs_path string) httprouter.Handle
Update acl table groups by names via case conditions by url location
func SmartTestAmavis ¶
func SmartTestAmavis(from, to string, postfixTables, amavisTables map[string]map[string]map[string]interface{}, amavisScoreMaps map[string]map[string]interface{}, amavisConf map[string]string) (string, error)
Smart test
This test analysis all input rules, maps, etc and return result checks: Example: your message may be banned as spam Example2: your message will be banned if contains attachment
func ValidateACL ¶
func ValidateACL(inputParams io.Reader, location string) (map[string]map[string]map[string]string, error)
Validate parameters and create map adapted for postfix and amavis Rewrite STRONG, WHITELIST etc...
func ValidateACLReload ¶
Check incoming map name and return extracted map name string from incoming json
func ValidateRegexpTable ¶
Check incoming parameters from json request and generate regexp lookup table string for postfix. Lookup table sorting by Priority from request.
Types ¶
This section is empty.