Documentation ¶
Index ¶
- Constants
- Variables
- func MQID_FIND_LG_INUM_SEPARATOR(queue_id string) int
- func MQID_GET_INUM(path string) (uint, error)
- func MQID_LG_DECODE(str string, base uint) (uint, error)
- func MQID_LG_DECODE_INUM(str string) (uint, error)
- func MQID_LG_DECODE_USEC(str string) (uint, error)
- func MQID_LG_ENCODE(val uint, base uint, padlen int) string
- func MQID_LG_ENCODE_INUM(val uint) string
- func MQID_LG_ENCODE_SEC(val uint) string
- func MQID_LG_ENCODE_USEC(val uint) string
- func MQID_LG_GET_HEX_USEC(queue_id string) string
- func MQID_SH_DECODE_INUM(str string) (uint, error)
- func MQID_SH_ENCODE_INUM(inum uint) string
- func MQID_SH_ENCODE_USEC(usec uint) string
- func MailConfCheckDir(config_dir string)
- func MailConfEval(str string) string
- func MailConfEvalOnce(str string) string
- func MailConfFlush()
- func MailConfLookup(name string) string
- func MailConfLookupEval(name string) string
- func MailConfRead()
- func MailConfSuck()
- func MailConfUpdate(key string, value string)
- func MailLogClientInit(progname string, flags int)
- func MailParamSplit(name string, value string) []string
- func MailParamsInit()
- func MailQueueDir(queue_name string, queue_id string) string
- func MailQueueIdOk(queue_id string) bool
- func MailQueueNameOk(queue_name string) bool
- func MailQueueOpen(queue_name string, queue_id string, flags int, mode fs.FileMode) (io.Reader, error)
- func MailQueuePath(queue_name string, queue_id string) string
- func MailTask(argv0 string) string
- func SafeStrToUl(str string, end *string, base uint) (uint, error)
- func SafeUlToStr(val uint, base uint, padlen int, padchar rune) string
- func SetMailConfStr(name string, value string)
- type CONFIG_BASE_TABLE
- type CONFIG_BOOL_TABLE
- type CONFIG_INT_TABLE
- type CONFIG_LONG_TABLE
- type CONFIG_NBOOL_TABLE
- type CONFIG_NINT_TABLE
- type CONFIG_RAW_TABLE
- type CONFIG_STR_TABLE
- type CONFIG_TIME_TABLE
Constants ¶
const ( COMPAT_LEVEL_0 = "0" COMPAT_LEVEL_1 = "1" COMPAT_LEVEL_2 = "2" COMPAT_LEVEL_3_6 = "3.6" LAST_COMPAT_LEVEL = COMPAT_LEVEL_3_6 )
* Compatibility level and migration support. Update postconf(5), * COMPATIBILITY_README, global/mail_params.[hc] and conf/main.cf when * updating the current compatibility level.
const ( MAIL_QUEUE_MAILDROP = "maildrop" MAIL_QUEUE_HOLD = "hold" MAIL_QUEUE_INCOMING = "incoming" MAIL_QUEUE_ACTIVE = "active" MAIL_QUEUE_DEFERRED = "deferred" MAIL_QUEUE_TRACE = "trace" MAIL_QUEUE_DEFER = "defer" MAIL_QUEUE_BOUNCE = "bounce" MAIL_QUEUE_CORRUPT = "corrupt" MAIL_QUEUE_FLUSH = "flush" MAIL_QUEUE_SAVED = "saved" )
* Mail queue names.
const ( MQID_LG_SEC_BASE = 52 /* seconds safe alphabet base */ MQID_LG_SEC_PAD = 6 /* seconds minimum field width */ MQID_LG_USEC_BASE = 52 /* microseconds safe alphabet base */ MQID_LG_USEC_PAD = 4 /* microseconds exact field width */ MQID_LG_TIME_PAD = (MQID_LG_SEC_PAD + MQID_LG_USEC_PAD) MQID_LG_INUM_SEP = 'z' /* time-inode separator */ MQID_LG_INUM_BASE = 51 /* inode safe alphabet base */ MQID_LG_INUM_PAD = 0 /* no padding needed */ )
* The long non-repeating queue ID is encoded in an alphabet of 10 digits, * 21 upper-case characters, and 21 or fewer lower-case characters. The * alphabet is made "safe" by removing all the vowels (AEIOUaeiou). The ID * is the concatenation of: * * - the time in seconds (base 52 encoded, six or more chars), * * - the time in microseconds (base 52 encoded, exactly four chars), * * - the 'z' character to separate the time and inode information, * * - the inode number (base 51 encoded so that it contains no 'z').
const ( MAILLOG_CLIENT_FLAG_NONE = 0 MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK = 1 << iota )
const CONFIG_BOOL_NO string = "no"
const CONFIG_BOOL_YES string = "yes"
* External representation for booleans.
const CONFIG_DICT string = "mail_dict" // global Postfix dictionary
* Well known names. These are not configurable. One has to start somewhere.
const CONF_ENV_DEBUG string = "MAIL_DEBUG" // live debugging
const CONF_ENV_LOGTAG string = "MAIL_LOGTAG" // instance name
const CONF_ENV_PATH string = "MAIL_CONFIG" // config database
* Environment variables.
const CONF_ENV_VERB string = "MAIL_VERBOSE" // verbose mode on
const DEF_COMPAT_LEVEL = COMPAT_LEVEL_0
const DEF_CONFIG_DIR = "/etc/postfix"
const DEF_HASH_QUEUE_DEPTH = 1
const DEF_HASH_QUEUE_NAMES = "deferred, defer"
const DEF_HELPFUL_WARNINGS = 1
const DEF_IMPORT_ENVIRON string = `MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG
TZ XAUTHORITY DISPLAY LANG=C
POSTLOG_SERVICE POSTLOG_HOSTNAME`
const DEF_LONG_QUEUE_IDS = false
const DEF_MAIL_NAME = "Postfix"
const DEF_MASTER_DISABLE string = ""
const DEF_MULTI_NAME string = ""
const DEF_QUEUE_DIR = "/var/spool/postfix"
const DEF_SHOW_UNK_RCPT_TABLE = 1
const DEF_SMTPD_SOFT_ERLIM string = "10"
const DEF_SYSLOG_NAME string = "${" + VAR_MULTI_NAME + "?{$" + VAR_MULTI_NAME + "}:{postfix}}"
const MQID_SH_USEC_PAD = 5 /* microseconds exact field width */
* The short repeating queue ID is encoded in upper-case hexadecimal, and is * the concatenation of: * * - the time in microseconds (exactly five chars), * * - the inode number.
const SAFE_MAX_BASE uint = uint(len(safe_chars))
const SAFE_MIN_BASE uint = uint(2)
const VAR_COMPAT_LEVEL = "compatibility_level"
const VAR_CONFIG_DIR = "config_directory"
* Location of configuration files.
const VAR_HASH_QUEUE_DEPTH = "hash_queue_depth"
const VAR_HASH_QUEUE_NAMES = "hash_queue_names"
* Queue management: what queues are hashed behind a forest of * subdirectories, and how deep the forest is.
const VAR_HELPFUL_WARNINGS = "helpful_warnings"
* You want to be helped or not.
const VAR_IMPORT_ENVIRON string = "import_environment"
* Environmental management - what Postfix imports from the external world, * and what Postfix exports to the external world.
const VAR_LONG_QUEUE_IDS = "enable_long_queue_ids"
* Short queue IDs contain the time in microseconds and file inode number. * Long queue IDs also contain the time in seconds.
const VAR_MAIL_NAME = "mail_name"
* Name used when this mail system announces itself.
const VAR_MASTER_DISABLE string = "master_service_disable"
const VAR_MULTI_NAME string = "multi_instance_name"
const VAR_PROCNAME string = "process_name"
const VAR_QUEUE_DIR = "queue_directory"
* Location of the mail queue directory tree.
const VAR_SHOW_UNK_RCPT_TABLE = "show_user_unknown_table_name"
* You want to be helped or not.
const VAR_SMTPD_SOFT_ERLIM string = "smtpd_soft_error_limit"
const VAR_SYSLOG_NAME string = "syslog_name"
Variables ¶
var VarConfigDir string
var VarHashQueueDepth int
var VarHashQueueNames string
var VarHelpfulWarnings bool
var VarImportEnviron string
var VarLongQueueIds bool
var VarMailName string
var VarMultiName string
var VarProcname string
var VarQueueDir string
var VarShowUnkRcptTable bool
var VarSmtpdSoftErlim int
var VarSyslogName string
Functions ¶
func MQID_GET_INUM ¶
func MQID_LG_DECODE_INUM ¶
func MQID_LG_DECODE_USEC ¶
func MQID_LG_ENCODE_INUM ¶
func MQID_LG_ENCODE_SEC ¶
func MQID_LG_ENCODE_USEC ¶
func MQID_LG_GET_HEX_USEC ¶
func MQID_SH_DECODE_INUM ¶
func MQID_SH_ENCODE_INUM ¶
func MQID_SH_ENCODE_USEC ¶
func MailConfCheckDir ¶
func MailConfCheckDir(config_dir string)
func MailConfEval ¶
func MailConfEvalOnce ¶
func MailConfFlush ¶
func MailConfFlush()
func MailConfLookup ¶
func MailConfLookupEval ¶
func MailConfRead ¶
func MailConfRead()
func MailConfSuck ¶
func MailConfSuck()
func MailConfUpdate ¶
func MailLogClientInit ¶
func MailParamSplit ¶
func MailParamsInit ¶
func MailParamsInit()
func MailQueueDir ¶
func MailQueueIdOk ¶
func MailQueueNameOk ¶
MailQueueNameOk - validate mail queue name