1 (* Postfix_Main module for Augeas
2 Author: Free Ekanayaka <free@64studio.com>
13 (************************************************************************
15 *************************************************************************)
18 let indent = del /[ \t]*(\n[ \t]+)?/ " "
19 let comment = Util.comment
20 let empty = Util.empty
21 let eq = del /[ \t]*=/ " ="
22 let word = /[A-Za-z0-9_.-]+/
24 (* The value of a parameter, after the '=' sign. Postfix allows that
25 * lines are continued by starting continuation lines with spaces.
26 * The definition needs to make sure we don't add indented comment lines
29 let chr = /[^# \t\n]/ in
31 let line = (chr . any* . chr | chr) in
32 let lines = line . (/[ \t]*\n[ \t]+/ . line)* in
35 (************************************************************************
37 *************************************************************************)
39 let entry = [ key word . eq . (indent . value)? . eol ]
41 (************************************************************************
43 *************************************************************************)
45 let lns = (comment|empty|entry) *
47 let filter = incl "/etc/postfix/main.cf"
48 . incl "/usr/local/etc/postfix/main.cf"
50 let xfm = transform lns filter