email.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. m = Map("luci_statistics",
  4. translate("E-Mail Plugin Configuration"),
  5. translate(
  6. "The email plugin creates a unix socket which can be used " ..
  7. "to transmit email-statistics to a running collectd daemon. " ..
  8. "This plugin is primarily intended to be used in conjunction " ..
  9. "with Mail::SpamAssasin::Plugin::Collectd but can be used in " ..
  10. "other ways as well."
  11. ))
  12. -- collectd_email config section
  13. s = m:section( NamedSection, "collectd_email", "luci_statistics" )
  14. -- collectd_email.enable
  15. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  16. enable.default = 0
  17. -- collectd_email.socketfile (SocketFile)
  18. socketfile = s:option( Value, "SocketFile", translate("Socket file") )
  19. socketfile.default = "/var/run/collect-email.sock"
  20. socketfile:depends( "enable", 1 )
  21. -- collectd_email.socketgroup (SocketGroup)
  22. socketgroup = s:option( Value, "SocketGroup", translate("Socket group") )
  23. socketgroup.default = "nobody"
  24. socketgroup.rmempty = true
  25. socketgroup.optional = true
  26. socketgroup:depends( "enable", 1 )
  27. -- collectd_email.socketperms (SocketPerms)
  28. socketperms = s:option( Value, "SocketPerms", translate("Socket permissions") )
  29. socketperms.default = "0770"
  30. socketperms.rmempty = true
  31. socketperms.optional = true
  32. socketperms:depends( "enable", 1 )
  33. -- collectd_email.maxconns (MaxConns)
  34. maxconns = s:option( Value, "MaxConns", translate("Maximum allowed connections") )
  35. maxconns.default = 5
  36. maxconns.isinteger = true
  37. maxconns.rmempty = true
  38. maxconns.optional = true
  39. maxconns:depends( "enable", 1 )
  40. return m