Skip to content
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

Postfix credential map not reliably created #2887

Open
conorsch opened this issue Jan 17, 2018 · 1 comment
Open

Postfix credential map not reliably created #2887

conorsch opened this issue Jan 17, 2018 · 1 comment

Comments

@conorsch
Copy link
Contributor

Bug

Description

The file /etc/postfix/sasl_password.db must exist in order for OSSEC alerts to be sent via email. If that file does not exist, running ./securedrop-admin install should create it—but the current config does not enforce it.

Steps to Reproduce

  1. Configure prod VMs with working OSSEC alerts.
  2. Run sudo rm /etc/postfix/sasl_password.db && sudo service postfix restart on the Monitor Server.
  3. Run ./securedrop-admin install from Admin Workstation and confirm that /etc/postfix/sasl_password.db is still missing.

Expected Behavior

If a file required for the OSSEC functionality is absent, Ansible should create it, properly enforcing server state.

Actual Behavior

The file /etc/postfix/sasl_password.db is only created via a handler, meaning that if the contents of /etc/postfix/sasl_password change, then-and-only-then will the sasl_password.db file be created.

Comments

The handler should remain in place: we want to make sure that changes to the config file trigger updates to the hash entries in sasl_password.db. However, we must also ensure that the file exists via a task.

Something like:

- name: Create Postfix lookup table.
  command: postmap /etc/postfix/sasl_credentials
  args:
    creates: /etc/postfix/sasl_credentials.db

Possibly related to #2478, which frequently results in incomplete configuration on the Monitor Server. Therefore the changes presented in #2748 should be finalized and merge before tackling this issue.

@conorsch
Copy link
Contributor Author

conorsch commented Jan 8, 2021

Unsure if this is still an issue. Based on the timestamps, this behavior was observed under Trusty, but we've since moved to Xenial, and are currently moving to Focal (#4768). If anyone can reproduce this issue, great, but not sure it's still a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants