Bug 1008036

Summary: setroubleshoot-server not sending emails
Product: [Fedora] Fedora Reporter: James Withers (Audere Commerce) <james.withers>
Component: setroubleshootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 19CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-25 19:31:50 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:

Description James Withers (Audere Commerce) 2013-09-13 21:16:40 UTC
Description of problem: setroubleshoot-server is not sending emails, despite no filter_type being set in email_alert_recipients. 


Version-Release number of selected component (if applicable):setroubleshoot-server-3.2.10-2.fc19.x86_64 


How reproducible: Every time


Steps to Reproduce:
1. Generate SELinux Denial (port 222 for SSH for example)

Actual results:
1. See error get logged in setroubleshoot_database.xml (i.e. setroubleshoot is detecting it).
2. No e-mail is sent, despite no filter_type being set in email_alert_recipients.

Expected results:
1. See error get logged in setroubleshoot_database.xml (i.e. setroubleshoot is detecting it).
2. No e-mail is sent, despite no filter_type being set in email_alert_recipients.

Additional info:
This only happened after an upgrade to setroubleshoot-server-3.2.10-2.fc19.x86_64; coincidentally, an email is sent if I restart the machine and the SSH denial is triggered during boot. All other mail and setroubleshoot-server functions work fine

Comment 1 Daniel Walsh 2013-09-16 18:39:54 UTC
Any think being reported in /var/log/messages?  Are you sure the conf file is setup correctly? 

In setroubleshoot.conf I setup.

# from_address: The From: email header
from_address = dwalsh

And

cat /var/lib/setroubleshoot/email_alert_recipients
dwalsh


Which sends email to me.

Comment 2 James Withers (Audere Commerce) 2013-09-17 22:37:45 UTC
I have the same setup (with different email addresses). In /var/lib/setroubleshoot/setroubleshoot_database.xml I see that setroubleshoot is detecting denial as it is updating when it was last seen. Yet it still will not send a notification.

Comment 3 Daniel Walsh 2013-09-18 15:24:00 UTC
Any errors in /var/log/messages or when you run mail as root?

Comment 4 James Withers (Audere Commerce) 2013-09-18 22:18:22 UTC
Fixed. In /var/lib/setroubleshoot/email_alert_recipients:

host    filter_type=never

Documentation (http://fedoraproject.org/wiki/Docs/Drafts/SELinux/SETroubleShoot/UserFAQ#2.3._Cansetroubleshoot_send_me_an_email_when_an_alert_fires.3F). Formatting isn't great but the information is there.

Completely my fault for not reading it thoroughly, something which I will be sure to do next time.

Regards,

James