Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
d926965e
Commit
d926965e
authored
Oct 19, 2018
by
Raphaël Pinson
Committed by
Raphaël Pinson
Oct 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make transport pattern accept regexp
parent
f9a114b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
files/lenses/postfix_transport.aug
files/lenses/postfix_transport.aug
+1
-1
files/lenses/test_postfix_transport.aug
files/lenses/test_postfix_transport.aug
+5
-0
No files found.
files/lenses/postfix_transport.aug
View file @
d926965e
...
...
@@ -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
]
...
...
files/lenses/test_postfix_transport.aug
View file @
d926965e
...
...
@@ -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"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment