postfix

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Working with postfix mail server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTable

func ApplyTable(tablename, tablepath string) error

Copy lookup table file from api edited(available) in server used(enabled) file

func GetCert

func GetCert() (string, error)

Get certificate file content

func GetMainCf

func GetMainCf(filepath string) map[string][]string

This function getting and return parameters map from main.cf format file (key = value1,value2,valueN..), from postfix configuration folder. Example map:

map[smtpd_tls_key_file:[/etc/postfix/ssl/mta01.uniq2Example.lan.key] setgid_group:[postdrop] manpage_directory:[/usr/share/man] readme_directory:[/usr/share/doc/postfix-2.10.1/README_FILES] smtpd_helo_restrictions:[permit_mynetworks  check_helo_access hash:/etc/postfix/wb/helo_access permit_sasl_authenticated reject_non_fqdn_helo_hostname reject_invalid_helo_hostname reject_unknown_helo_hostname] ....

func GetRegexpTable

func GetRegexpTable(tablepath string) (map[string]interface{}, error)

Getting and return parameters map from postfix regexp tables

func PostmapQuery

func PostmapQuery(postfix_configs_path, tablename, query string) (string, error)

Working with postmap util

func UpdateCert

func UpdateCert(cert, key string) error

Update certificate and key files and restart postfix server

func UpdateMainCf

func UpdateMainCf(currentParams map[string][]string,
	inputParams map[string]interface{},
	postfix_configs_path string) error

Update main.cf configuration map from compiling parameters current and recieved from api

func UpdateRegexpTable

func UpdateRegexpTable(inputParams string, tablepath string) error

Write lookup regexp table to file in api edited(available) folder

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL