Bug 1398910
Summary: | Default example postfix chroot-update does not work on Fedora | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Scott Shambarger <scott-fedora> |
Component: | postfix | Assignee: | Jaroslav Škarvada <jskarvad> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | jskarvad, niekto, olysonek |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-03-26 15:24:44 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Description
Scott Shambarger
2016-11-27 09:23:06 UTC
Created bug 1398913 for the mkdir SELinux bug This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. Still present in F26 This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Bug still present in F27 3.2.5-2 This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Bug still present in postfix-3.3.1-5.fc29, updating to F29 Created attachment 1519728 [details]
new chroot-update script
To fix issue with resolving A and PTR records by smtpd I wrote a little script you can find in attachment. It's working on my CentOS 7.6 system and with paths patterns generalization it could be usable by more GNU/Linux distributions. It also utilizes restorecon (with recursive option set) to restore SELinux contexts over /var/spool/postfix if SELinux is in enforcing state.
You could probably simplify the script by adding '-Z' to the cp command, then restorecon wouldn't be necessary (not to mention you'd still get AVC errors if SELinux was in passive mode... -Z or restorecon should always be used :) Also, the 'postfix reload' will fail when the script is called at ExecStartPre in the postfix.service file... Created attachment 1519887 [details]
chroot-update simplified a bit
Yeah you are right. I replaced restorecon with 'cp -Z' and improved regexps a bit. Also I removed that reload which I forgot there by mistake. Thanks :)
Comment on attachment 1519887 [details]
chroot-update simplified a bit
COPY left commented by mistake. Also in next version find is sanitized by '-type f' and '-L' options.
Created attachment 1519889 [details]
chroot-update script using regexp patterns to find and copy requires libs and cfg files
(In reply to Jaroslav Petráš from comment #9) > Created attachment 1519728 [details] > new chroot-update script > > To fix issue with resolving A and PTR records by smtpd I wrote a little > script you can find in attachment. It's working on my CentOS 7.6 system and > with paths patterns generalization it could be usable by more GNU/Linux > distributions. It also utilizes restorecon (with recursive option set) to > restore SELinux contexts over /var/spool/postfix if SELinux is in enforcing > state. Please, could you be more specific what's the source of the problem? I would prefer patching the original script instead of writing new one. Is it lack of mdns4_minimal support in the chroot? Current /etc/nsswitch.conf has (f29): hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname mymachines IMHO the default action for UNAVAIL is continue, so it should work even without the mdns4_minimal libraries. Or is there different problem? I am going to fix the root causes described in the comment 0 by applying the provided patch - thanks for it. In case it's not enough or if you encounter more related problems, please reopen this bug or file a new one (preferred). Also to simplify things I am moving this bug to rawhide (according to the bug history it shouldn't be a problem). If you need the fix in previous Fedora versions, please let me know. |