# Postfix_Transport

Parses /etc/postfix/transport

Author: Raphael Pinson raphael.nosp@m..pinson@camptoc.nosp@m.amp.com

Summary

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 |

### 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. See filter.

### Examples

The Test_Postfix_Transport file contains various examples and tests.

### Augeas Lenses

### space_or_eol

> let space_or_eol = del /([ \t]*\n)?[ \t]+/ " "

### colon

> let colon = Sep.colon

### nexthop

> let nexthop = let host_re = "[" . Rx.word . "]" | /[A-Za-z]([^\n]*[^ \t\n])?/ in [ label "nexthop" . (store host_re)? ]

### transport

> let transport = [ label "transport" . (store Rx.word)? ] . colon . nexthop

### nexthop_smtp

> let nexthop_smtp = let host_re = "[" . Rx.word . "]" | Rx.word in [ label "host" . store host_re ] . colon . [ label "port" . store Rx.integer ]

### record

> let record = [ label "pattern" . store /[A-Za-z0-9@\*.-]+/ . space_or_eol . (transport | nexthop_smtp) . Util.eol ]

### lns

> let lns = (Util.empty | Util.comment | record)*

### Augeas Variables

### filter

Provides unit tests and examples for the Postfix_Transport lens.

> 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)*

Close