-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restart postfix service and add rule has_nonlocal_mta #10359
Conversation
This datastream diff is auto generated by the check Click here to see the full diffbash remediation for rule 'xccdf_org.ssgproject.content_rule_postfix_network_listening_disabled' differs.
--- xccdf_org.ssgproject.content_rule_postfix_network_listening_disabled
+++ xccdf_org.ssgproject.content_rule_postfix_network_listening_disabled
@@ -19,6 +19,8 @@
# Clean up after ourselves.
rm "/etc/postfix/main.cf.bak"
+systemctl restart postfix
+
else
>&2 echo 'Remediation is not applicable, nothing was done'
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to have some test scenarios for this new rule. Could you include, please?
I'm not sure that's possible. There's no remediation on this rule. |
The rule checks if there is a service listening on tcp/25 and binding to anything different of localhost addresses. Regarding the tests, we could use For a In the |
nice! I completely forgot about |
Code Climate has analyzed commit 307508d and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 51.8% (-0.1% change). View more on Code Climate. |
The |
/packit retest-failed |
Automatus CS8, CS9 and Fedora tests are failing because the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the postfix_network_listening_disabled
checks the postfix configuration, the new has_nonlocal_mta
ensures there is no service listening on 25/tcp
for addresses different than localhost. This rule is a useful complement for the related requirements. Thanks
Overriding CODEOWNERS since a SUSE approver is not currently available and @dodys can't approve his own PR. |
Description:
postfix_network_listening_disabled
was missing a restart of postfix service in bash remediation. I didn't touch the ansible for that, hopefully some other vendor can check it and add it if needed.has_nonlocal_mta
to actually check that the MTA is not listening on any non-loopback address ( 127.0.0.1 or ::1 )Rationale: