Skip to content

Commit

Permalink
Allow underscore in postfix_transport (#678)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Baranov <[email protected]>
  • Loading branch information
spacedog authored Jun 11, 2020
1 parent c386376 commit 1511eee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lenses/postfix_transport.aug
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ let nexthop_smtp =
. [ label "port" . store Rx.integer ]

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

Expand Down
4 changes: 4 additions & 0 deletions lenses/tests/test_postfix_transport.aug
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ example.com slow:
example.com :[gateway.example.com]
[email protected]
smtp:bar.example:2025
[email protected] discard:
.example.com error:mail for *.example.com is not deliverable
"

Expand Down Expand Up @@ -42,6 +43,9 @@ test Postfix_Transport.lns get conf =
{ "pattern" = "[email protected]"
{ "transport" = "smtp" }
{ "nexthop" = "bar.example:2025" } }
{ "pattern" = "[email protected]"
{ "transport" = "discard" }
{ "nexthop" } }
{ "pattern" = ".example.com"
{ "transport" = "error" }
{ "nexthop" = "mail for *.example.com is not deliverable" } }
Expand Down

0 comments on commit 1511eee

Please sign in to comment.