diff options
Diffstat (limited to 'postfix-model.lua')
-rw-r--r-- | postfix-model.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/postfix-model.lua b/postfix-model.lua index 1c71401..8708263 100644 --- a/postfix-model.lua +++ b/postfix-model.lua @@ -193,4 +193,20 @@ function mymodule.flushqueue(self, flush) return flush end +function mymodule.get_logfile(self, clientdata) + local retval = cfe({ type="group", value={}, label="Log File Configuration" }) + retval.value.facility = cfe({value="mail", label="Syslog Facility"}) + retval.value.grep = cfe({ value="postfix", label="Grep" }) + + local config = getconfig() + if config["syslog_facility"] then + retval.value.facility.value = string.lower(config["syslog_facility"]) + end + if config["syslog_name"] then + retval.value.grep.value = config["syslog_name"] + end + + return retval +end + return mymodule |