Commit 0bfa1070 authored by Pete Brown's avatar Pete Brown Committed by Raphaël Pinson
Browse files

Fix email address matching for postfix::virtual augeas lens

Make sure our version of the lens gets installed
parent 03b84c43
...@@ -29,10 +29,10 @@ let space_or_eol_re = /([ \t]*\n)?[ \t]+/ ...@@ -29,10 +29,10 @@ let space_or_eol_re = /([ \t]*\n)?[ \t]+/
(* View: space_or_eol *) (* View: space_or_eol *)
let space_or_eol (sep:regexp) (default:string) = let space_or_eol (sep:regexp) (default:string) =
del (space_or_eol_re? . sep . space_or_eol_re?) default del (space_or_eol_re? . sep . space_or_eol_re?) default
(* View: word *) (* View: word *)
let word = store /[A-Za-z0-9@\*.+-]+/ let word = store /[A-Za-z0-9@\*.+=_-]+/
(* View: comma *) (* View: comma *)
let comma = space_or_eol "," ", " let comma = space_or_eol "," ", "
......
...@@ -10,7 +10,11 @@ let conf = "# a comment ...@@ -10,7 +10,11 @@ let conf = "# a comment
virtual-alias.domain anything virtual-alias.domain anything
postmaster@virtual-alias.domain postmaster postmaster@virtual-alias.domain postmaster
user1@virtual-alias.domain address1 user1@virtual-alias.domain address1
user2@virtual-alias.domain user-1@virtual-alias.domain address1
user_2@virtual-alias.domain
address2,
address3
user+test@virtual-alias.domain
address2, address2,
address3 address3
root robert.oot@domain.com root robert.oot@domain.com
...@@ -29,7 +33,14 @@ test Postfix_Virtual.lns get conf = ...@@ -29,7 +33,14 @@ test Postfix_Virtual.lns get conf =
{ "pattern" = "user1@virtual-alias.domain" { "pattern" = "user1@virtual-alias.domain"
{ "destination" = "address1" } { "destination" = "address1" }
} }
{ "pattern" = "user2@virtual-alias.domain" { "pattern" = "user-1@virtual-alias.domain"
{ "destination" = "address1" }
}
{ "pattern" = "user_2@virtual-alias.domain"
{ "destination" = "address2" }
{ "destination" = "address3" }
}
{ "pattern" = "user+test@virtual-alias.domain"
{ "destination" = "address2" } { "destination" = "address2" }
{ "destination" = "address3" } { "destination" = "address3" }
} }
......
...@@ -14,7 +14,7 @@ class postfix::augeas { ...@@ -14,7 +14,7 @@ class postfix::augeas {
ensure => present, ensure => present,
lens_content => file("${module_path}/files/lenses/postfix_virtual.aug"), lens_content => file("${module_path}/files/lenses/postfix_virtual.aug"),
test_content => file("${module_path}/files/lenses/test_postfix_virtual.aug"), test_content => file("${module_path}/files/lenses/test_postfix_virtual.aug"),
stock_since => '1.0.0', stock_since => '1.7.0',
} }
augeas::lens {'postfix_canonical': augeas::lens {'postfix_canonical':
ensure => present, ensure => present,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment