META-INF.augeas-lenses.postfix_master.aug Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rhq-postfix-plugin Show documentation
Show all versions of rhq-postfix-plugin Show documentation
A plugin for managing the RHEL Postfix server
(* Postfix_Master module for Augeas
Author: Free Ekanayaka
Reference:
*)
module Postfix_Master =
autoload xfm
(************************************************************************
* USEFUL PRIMITIVES
*************************************************************************)
let eol = Util.eol
let ws = del /[ \t\n]+/ " "
let comment = Util.comment
let empty = Util.empty
let word = /[A-Za-z0-9_.-]+/
let words = /[A-Za-z0-9$(){}=!_.-][A-Za-z0-9$!(){} =\/_.-]*[A-Za-z0-9$!(){}=\/_.-]/
let bool = /y|n|-/
let integer = /([0-9]+|-)\??/
let command = words . (/\n[ \t]+/ . words)*
let field (l:string) (r:regexp)
= [ label l . store r ]
(************************************************************************
* ENTRIES
*************************************************************************)
let entry = [ key word . ws
. field "type" /inet|unix|fifo|pass/ . ws
. field "private" bool . ws
. field "unpriviliged" bool . ws
. field "chroot" bool . ws
. field "wakeup" integer . ws
. field "limit" integer . ws
. field "command" command
. eol ]
(************************************************************************
* LENS
*************************************************************************)
let lns = (comment|empty|entry) *
let filter = incl "/etc/postfix/master.cf"
. Util.stdexcl
let xfm = transform lns filter