Commit d926965e authored by Raphaël Pinson's avatar Raphaël Pinson Committed by Raphaël Pinson
Browse files

Make transport pattern accept regexp

parent f9a114b2
Loading
Loading
Loading
Loading
+1 −1
Changes for files/lenses/postfix_transport.aug: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ let transport = [ label "transport" . (store Rx.word)? ]
let nexthop = [ label "nexthop" . (store Rx.space_in)? ]

(* View: record *)
let record = [ label "pattern" . store /[A-Za-z0-9@\*.-]+/
let record = [ label "pattern" . store /[^# \t\r\n]+/
             . space_or_eol . transport
             . colon . nexthop
             . Util.eol ]
+5 −0
Changes for files/lenses/test_postfix_transport.aug: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ example.com :[gateway.example.com]
user.foo@example.com  
    smtp:bar.example:2025
.example.com     error:mail for *.example.com is not deliverable
/^bounce\+.*/ sympabounce:
"

(* Test: Postfix_Transport.lns *)
@@ -45,4 +46,8 @@ test Postfix_Transport.lns get conf =
  { "pattern" = ".example.com"
    { "transport" = "error" }
    { "nexthop" = "mail for *.example.com is not deliverable" } }
  { "pattern" = "/^bounce\+.*/"
    { "transport" = "sympabounce" }
    { "nexthop" } }