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] fix extra.cf updating #5372

Merged
merged 1 commit into from
Oct 12, 2023
Merged

[Postfix] fix extra.cf updating #5372

merged 1 commit into from
Oct 12, 2023

Conversation

Habetdin
Copy link
Contributor

@Habetdin Habetdin commented Aug 4, 2023

I was trying to extend the postfix configuration by adding custom directives to extra.cf, and found out that some of them were disappearing on postfix-mailcow restarts. Specifically, this line:
smtpd_banner = $myhostname ESMTP Postfix
Same problem is described here.

That happens due to untied /myhostname/d sed operation in data/Dockerfiles/postfix/postfix.sh - it deletes not only the myhostname = example.org line before updating it, but also lines like mentioned above.

This PR fixes the issue by ignoring lines that contain $myhostname (variable, not a directive) when cleaning up the extra.cf.

@sriccio
Copy link
Contributor

sriccio commented Aug 5, 2023

Shouldn't extra.cf basically left untouched by any install/update scripts ? as it should be only user overrides...

@Habetdin
Copy link
Contributor Author

Habetdin commented Aug 5, 2023

@sriccio yeah, I agree that the myhostname should be added to main.cf in different way.

Current method was introduced in this commit back in the end of 2020, I don't know why it was done in that way.

I didn't change the current behaviour, just fixed the issue it has.

@PatrickDeZordo
Copy link

same error here, please change it to work like mentioned in https://docs.mailcow.email/de/manual-guides/Postfix/u_e-postfix-extra_cf/

Thx! 🤞

Copy link
Member

@DerLinkman DerLinkman left a comment

Choose a reason for hiding this comment

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

Looks very good! Thank you!

@DerLinkman DerLinkman merged commit 4375345 into mailcow:staging Oct 12, 2023
2 checks passed
@Habetdin Habetdin deleted the staging branch October 12, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants