Bug 890585
| Summary: | Sendmail RPM does not ship useful mailstats defaults for 10+ years | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Robert Scheck <redhat-bugzilla> |
| Component: | sendmail | Assignee: | Jaroslav Škarvada <jskarvad> |
| Status: | CLOSED ERRATA | QA Contact: | Roman Žilka <rzilka> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | amahdal, jskarvad, mlichvar, nparmar, psklenar, rzilka, thozza, twoerner |
| Target Milestone: | rc | Keywords: | EasyFix, FastFix |
| Target Release: | 7.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | sendmail-8.14.7-5.el7 sendmail-8.15.2-16.fc26 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-01 12:42:36 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1298243 | ||
Cross-filed case 00775785 in the Red Hat Customer Portal to address this also for RHEL 7 (and maybe via the paid Red Hat way also for Fedora then). This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. The comment above is incorrect. The correct version is bellow. I'm sorry for any inconvenience. --------------------------------------------------------------- This request was NOT resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you need to escalate this bug. What do you mean by "useful"? MTA statistics are working, thus the statistics file is useful. The only file that is missing is file for MSP statistics, but as sendmail is usually used as a SMTP server in enterprise, I do not see this as a "show stopper". If needed, the MSP statistics can be still enabled by simple touch command. I think this is worth fixing and it's easy fix. But I don't think it's a good idea to change default location of statistics files in stable enterprise release just to 'align with Debian'. Is there any other technical reason why to do so? We can change it in Fedora rawhide, but not in stable RHEL. [1] Our default for sm-client is: /var/spool/clientmqueue/sm-client.st and the statistics are disabled. [2] Better default would be: /var/log/mail/sm-client.st to align it with the current sendmail statistics (/var/log/mail/statistics) [3] And probably the best default is: /var/lib/sendmail/sm-client.st and /var/lib/sendmail/statistics or /var/lib/sendmail/sendmail.st (it's not clear whether upstream prefers 'statistics' or 'sendmail.st') We shouldn't change the defaults to [3] or [2] during lifetime of the product, but we could consider the change for Fedora and next RHEL. For now just explicitly enabling the stats for mailstats program to work. (In reply to Jaroslav Škarvada from comment #9) > [3] And probably the best default is: The best regarding FHS and structure of other packages (i.e. probably the most clean). Jaroslav, thank you very much for taking care here. Note, the RHBZ as well as the corresponding GSS ticket were filed 1+ years before RHEL 7 GA. Thus the changes as mentioned are fine for RHEL 7.x from my point of view. For Fedora Rawhide (thus next RHEL) however, I would prefer [3]. While in the end I less care about …/sendmail.st vs. …/statistics, I personally would prefer …/sendmail.st to make the difference between the two daemons/files a bit more obvious. Shall I put this second paragraph into a separate RHBZ? (In reply to Robert Scheck from comment #12) > Jaroslav, thank you very much for taking care here. Note, the RHBZ as well > as the corresponding GSS ticket were filed 1+ years before RHEL 7 GA. Thus > the changes as mentioned are fine for RHEL 7.x from my point of view. > > For Fedora Rawhide (thus next RHEL) however, I would prefer [3]. While in > the end I less care about …/sendmail.st vs. …/statistics, I personally would > prefer …/sendmail.st to make the difference between the two daemons/files a > bit more obvious. Shall I put this second paragraph into a separate RHBZ? Please file Fedora rawhide bug. (In reply to Jaroslav Škarvada from comment #13) > Please file Fedora rawhide bug. Done, bug #1435639 - thank you. QA: OK on all archs ************* sendmail-8.14.7-4.el7 (faulty): # grep StatusFile /etc/mail/* /etc/mail/sendmail.cf:O StatusFile=/var/log/mail/statistics /etc/mail/submit.cf:O StatusFile=/var/spool/clientmqueue/sm-client.st # ls -l /var/log/mail/statistics /var/spool/clientmqueue/sm-client.st ls: cannot access /var/spool/clientmqueue/sm-client.st: No such file or directory -rw-------. 1 root root 0 Jan 27 2014 /var/log/mail/statistics ************* sendmail-8.14.7-5.el7 (fixed): # grep StatusFile /etc/mail/* /etc/mail/sendmail.cf:O StatusFile=/var/log/mail/statistics /etc/mail/submit.cf:O StatusFile=/var/spool/clientmqueue/sm-client.st # ls -l /var/log/mail/statistics /var/spool/clientmqueue/sm-client.st -rw-------. 1 root root 0 Mar 23 14:10 /var/log/mail/statistics -rw-rw----. 1 smmsp smmsp 0 Apr 13 08:46 /var/spool/clientmqueue/sm-client.st sendmail-8.15.2-15.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f4431ab4a2 sendmail-8.15.2-16.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f4431ab4a2 This is a strange status transition. Still, sendmail-8.15.2-16.fc26 verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2197 sendmail-8.15.2-16.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: I don't exactly know why the statistics file was relocated from originally /etc/mail/statistics to /var/log/mail/statistics - yes, /etc/mail is not a good place, however /var/log/mail/statistics is neither. Actually that file is more a database containing statistics than a log file. Additionally, one more statistics file existing since 8.12.0 (2001/09/08) is also missing by default in Fedora/RHEL. The mailstats command displays statistics on the volume of mail processed by sendmail. The time at which data collection commenced is printed first, followed by a table with one row for each configured mailer and one showing a summary total of all mail. The data for the mailstats command is gathered from "O StatusFile" from the sendmail.cf - and since 8.12.0 also from submit.cf. Right now, this looks on Fedora like this: /etc/mail/sendmail.cf:O StatusFile=/var/log/mail/statistics /etc/mail/submit.cf:O StatusFile=/var/spool/clientmqueue/sm-client.st Fedora is shipping /var/log/mail/statistics as %config(noreplace), which is not that wrong, however /var/spool/clientmqueue/sm-client.st isn't shipped at all. Thus mailstats only gathers data by default for the SMTP instance, not for the MSA instance. Some could create the missing file themself, but still the existence of the directory /var/log/mail seems wrong to me. Suggestion to get rid this: 1. Move /var/log/mail/statistics to /var/lib/sendmail/sendmail.st 2. Create /var/lib/sendmail/sm-client.st (figure out the permissions first) 3. Do not ship %dir /var/log/mail any longer 4. Adapt SELinux policy accordingly (if needed) Finally /var/lib/sendmail could also be a good place for dead.letter or the other statistics tool, hoststat(1) via "O HostStatusDirectory". The suggested new paths also align with Debian. OpenSUSE seems to be similar strange: /var/lib/sendmail/statistics & /var/spool/clientmqueue/sm-client.st They even ship /var/spool/mqueue/.hoststat, but nothing for the MSA instance of Sendmail through. Debian does not configure HostStatusDirectory at all by default. RHL 6.1 used /var/log/sendmail.st (Sendmail 8.9.x). We eventually could think about /var/log/mail/{sendmail,sm-client}.st or something similar, but I still don't think that the log directory is that well here. Version-Release number of selected component (if applicable): sendmail-8.14.6-1 How reproducible: Everytime, see above and below. Actual results: Sendmail RPM does not ship useful mailstats defaults for 10+ years. Expected results: See suggestion above. I'm also up to discussions or clarifications from the guys who did the upgrade inside of RHL (which are less meanwhile IIRC).