Blame lenses/postfix_passwordmap.aug
|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Postfix_Passwordmap
|
|
Packit Service |
a2ae7a |
Parses /etc/postfix/*passwd
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Anton Baranov <abaranov@linuxfoundation.org>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
This lens tries to keep as close as possible to `man 5 postconf` and
|
|
Packit Service |
a2ae7a |
http://www.postfix.org/SASL_README.html#client_sasl_enable where possible.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: License
|
|
Packit Service |
a2ae7a |
This file is licenced under the LGPL v2+, like the rest of Augeas.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to /etc/postfix/*passwd. See <filter>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Examples
|
|
Packit Service |
a2ae7a |
The <Test_Postfix_Passwordmap> file contains various examples and tests.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Postfix_Passwordmap =
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: space_or_eol *)
|
|
Packit Service |
a2ae7a |
let space_or_eol = del /([ \t]*\n)?[ \t]+/ " "
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: word *)
|
|
Packit Service |
a2ae7a |
let word = store /[A-Za-z0-9@_\+\*.-]+/
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: colon *)
|
|
Packit Service |
a2ae7a |
let colon = Sep.colon
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: username *)
|
|
Packit Service |
a2ae7a |
let username = [ label "username" . word ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: password *)
|
|
Packit Service |
a2ae7a |
let password = [ label "password" . (store Rx.space_in)? ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: record *)
|
|
Packit Service |
a2ae7a |
let record = [ label "pattern" . store /\[?[A-Za-z0-9@\*.-]+\]?(:?[A-Za-z0-9]*)*/
|
|
Packit Service |
a2ae7a |
. space_or_eol . username . colon . password
|
|
Packit Service |
a2ae7a |
. Util.eol ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: lns *)
|
|
Packit Service |
a2ae7a |
let lns = (Util.empty | Util.comment | record)*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Variable: filter *)
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/postfix/*passwd"
|
|
Packit Service |
a2ae7a |
. incl "/usr/local/etc/postfix/*passwd"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|