Bug 1303422
Summary: | satellite sync hard coded email FROM does not allow customization for email addresses | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Shannon Hughes <shughes> | ||||||
Component: | Satellite Synchronization | Assignee: | Grant Gainey <ggainey> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Korbel <mkorbel> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 580 | CC: | dyordano, ggainey, mkorbel, mmello, pghadge, shughes, tlestach, xdmoon | ||||||
Target Milestone: | --- | Keywords: | Patch | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2017-06-21 12:17:18 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: | 1358815 | ||||||||
Attachments: |
|
Description
Shannon Hughes
2016-01-31 16:04:43 UTC
Created attachment 1119915 [details]
patch to add default_mail_from support to satsync
In the attached patch, if parseaddr fails, then sndr ends up as ''. Can we instead notice this, log an error, and default back to root@host_label? Otherwise, the emails arrive with no From line, and it makes it much harder for the customer to figure out what machine has a cfg-problem. Grant, I'll take a look when I am back in the office but good catch. Will fix it up. Created attachment 1120892 [details]
sat sync patch for default mail
this patch removes the need for the parse address lib
test plan: 1) modify rhn.conf and break the sat sync by modifying parent with a bogus name server.satellite.rhn_parent = ssatellite.rhn.redhat.com 2) Add a new config var for the default email address for satellite.server namespace in rhn.conf server.satellite.default_mail_from = user@fqdn 3) run satsync with email option, tail the /var/log/maillog file satellite-sync -l --email 4) confirm mail from address shows up in /var/log/maillog 5) now comment out the server.satellite.default_mail_from config var. rerun sat sync. Confirm the mail from address is now root@hostname in /var/log/maillog spacewalk.github c6369d1f57b352e49b116e677f5d2fbc5831d703 NOTE: use the included patch when applying to Satellite, the pune-to-puny namechange will get in the way of cherry-picking the SW commit The patch can be found here - https://github.com/spacewalkproject/spacewalk/commit/c6369d1f57b352e49b116e677f5d2fbc5831d703 But according to Comment 6, there may be more changes needed. VERIFIED on spacewalk-backend-2.5.3-137 (SAT5.8_20170529) Reproducer: 1. Add "default_mail_from" into rhn.conf > echo "server.satellite.default_mail_from = tester" >> /etc/rhn/rhn.conf 2. Sync some channel > cdn-sync -c rhn-tools-rhel-x86_64-server-5 --email 3. Check mailbox > mail ... N 11 tester Thu Jun 1 07:28 661/46162 "CDN sync. report from host-8-179-109.host.centralc" |