Parses /etc/postfix/transport
Author: Raphael Pinson raphael@camptoc amp.com .pinson
Postfix_Transport | Parses /etc/postfix/transport |
Reference | This lens tries to keep as close as possible to `man 5 transport` where possible. |
License | This file is licenced under the LGPL v2+, like the rest of Augeas. |
Lens Usage | To be documented |
Configuration files | This lens applies to /etc/postfix/transport. |
Examples | The Test_Postfix_Transport file contains various examples and tests. |
Augeas Lenses | |
space_or_eol | |
colon | |
nexthop | |
transport | |
nexthop_smtp | |
record | |
lns | |
Augeas Variables | |
filter |
This lens applies to /etc/postfix/transport. See filter.
The Test_Postfix_Transport file contains various examples and tests.
let space_or_eol = del /([ \t]*\n)?[ \t]+/ " "
let colon = Sep.colon
let nexthop = let host_re = "[" . Rx.word . "]" | /[A-Za-z]([^\n]*[^ \t\n])?/ in [ label "nexthop" . (store host_re)? ]
let transport = [ label "transport" . (store Rx.word)? ] . colon . nexthop
let nexthop_smtp = let host_re = "[" . Rx.word . "]" | Rx.word in [ label "host" . store host_re ] . colon . [ label "port" . store Rx.integer ]
let record = [ label "pattern" . store /[A-Za-z0-9@\*.-]+/ . space_or_eol . (transport | nexthop_smtp) . Util.eol ]
let lns = (Util.empty | Util.comment | record)*