Skip to content

Add parameters#28

Merged
Phil-Friderici merged 2 commits into
Ericsson:masterfrom
anders-larsson:add_parameters
Sep 12, 2016
Merged

Add parameters#28
Phil-Friderici merged 2 commits into
Ericsson:masterfrom
anders-larsson:add_parameters

Conversation

@anders-larsson
Copy link
Copy Markdown
Contributor

This pull request adds a total of four new parameters to configure my_domain, smtpd_helo_required, smtpd_helo_restrictions and finally smtpd_recipient_restrictions.

With the default settings no additional entries are added to main.cf.

Comment thread manifests/init.pp Outdated
if is_integer($main_mailbox_size_limit_real) == false { fail("main_mailbox_size_limit must be an integer and is set to <${main_mailbox_size_limit_real}>") }
if $main_mailbox_size_limit_real + 0 < 0 { fail("main_mailbox_size_limit needs a minimum value of 0 and is set to <${main_mailbox_size_limit_real}>") }
validate_string($main_mydestination_real)
if $main_mydomain != undef { if is_domain_name($main_mydomain) != true { fail("main_mydomain must be a domain name and is set to <${main_mydomain}>") } }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think using an and between both conditions would ease the readability

@Phil-Friderici
Copy link
Copy Markdown
Contributor

Thanks @anders-larsson ! All there, looks good to me. Please have a look at my comment regarding the validation.

@anders-larsson
Copy link
Copy Markdown
Contributor Author

Cool. I'm not working tomorrow. Will fix on Monday. Thanks for fast review!

@Phil-Friderici
Copy link
Copy Markdown
Contributor

@anders-larsson no worries, neither I am working ;)

@anders-larsson
Copy link
Copy Markdown
Contributor Author

I've updated the first commit to include your requested changes.

Comment thread spec/classes/init_spec.rb Outdated
}
end

describe "with main_smtpd_helo_required set to 'yes' and main_smtpd_restrictions" do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no mandatory connection of $main_smtpd_helo_required and $main_smtpd_restrictions in the code.
Please change the tests to become individual for each parameter too.

@anders-larsson
Copy link
Copy Markdown
Contributor Author

Updated! :)

@Phil-Friderici Phil-Friderici merged commit c6af988 into Ericsson:master Sep 12, 2016
@Phil-Friderici
Copy link
Copy Markdown
Contributor

Thanks @anders-larsson ! Released in v1.4.0

@anders-larsson anders-larsson deleted the add_parameters branch September 12, 2016 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants