Commit 12e0ce29 authored by Erinn Looney-Triggs's avatar Erinn Looney-Triggs Committed by Raphaël Pinson
Browse files

Fix issue with multiple mynetworks.

parent 55e48b48
......@@ -35,7 +35,7 @@ class postfix::mta (
'Wrong value for $relayhost')
validate_re($mydestination, '^\S+(?:,\s*\S+)*$',
'Wrong value for $mydestination')
validate_re($mynetworks, '^\S+$',
validate_re($mynetworks, '^(?:\S+?(?:(?:,\s)|(?:\s))?)*$',
'Wrong value for $mynetworks')
# If direct is specified then relayhost should be blank
......
......@@ -8,12 +8,12 @@ describe 'postfix::mta' do
let :pre_condition do
"class { 'postfix':
mydestination => 'bar',
mynetworks => 'baz',
mynetworks => '127.0.0.1/8, [::1]/128 ![::2]/128',
relayhost => 'foo',
}"
end
it { is_expected.to contain_postfix__config('mydestination').with_value('bar') }
it { is_expected.to contain_postfix__config('mynetworks').with_value('baz') }
it { is_expected.to contain_postfix__config('mynetworks').with_value('127.0.0.1/8, [::1]/128 ![::2]/128') }
it { is_expected.to contain_postfix__config('relayhost').with_value('foo') }
end
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