summaryrefslogtreecommitdiffstats
path: root/postfix-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-10-31 19:21:40 +0000
committerTed Trask <ttrask01@yahoo.com>2015-10-31 19:21:40 +0000
commit27c58808249d14a89dc336294d846ded95b3d262 (patch)
treeb6f23750000ce5ee9381c1dc915b530442a35c27 /postfix-model.lua
parentb1712a70f888a4cf2f766a9c1d051274f9a2a81d (diff)
downloadacf-postfix-27c58808249d14a89dc336294d846ded95b3d262.tar.bz2
acf-postfix-27c58808249d14a89dc336294d846ded95b3d262.tar.xz
Modify logfile to get logging info from the config and use common view
Diffstat (limited to 'postfix-model.lua')
-rw-r--r--postfix-model.lua16
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