Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1148540

Summary: add selinux policy for e-mail notifier on pulp-workers
Product: [Retired] Pulp Reporter: Irina Gulina <igulina>
Component: z_otherAssignee: Brian Bouterse <bmbouter>
Status: CLOSED CURRENTRELEASE QA Contact: Irina Gulina <igulina>
Severity: high Docs Contact:
Priority: high    
Version: 2.5Keywords: Triaged
Target Milestone: ---   
Target Release: 2.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-24 21:33:17 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 Flags
email received none

Description Irina Gulina 2014-10-01 16:45:59 UTC
Description of problem:
No email after adding email notifier

Version-Release number of selected component (if applicable):
>> rpm -qa | grep pulp-server
pulp-server-2.5.0-0.6.beta.fc20.noarch

How reproducible:
always

Steps to Reproduce:
>> pulp-admin -u admin -p admin event listener email create --event-type="repo.publish.start" --subject='repo publish start event' --addresses='some_email@domain'
Event listener successfully created
 
>> pulp-admin -u admin -p admin event listener list
Event Types:       repo.publish.start
Id:                542afe5599cca80c0906a8bf
Notifier Config:  
  Addresses: some_email@domain
  Subject:   repo publish start event
Notifier Type Id:  email
 
>> pulp-admin -u admin -p admin rpm repo create --repo-id gena --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
Successfully created repository [gena]
 
>> pulp-admin -u admin -p admin rpm repo publish run  --repo-id gena
<.....>
[-]
... completed
 
Task Succeeded

And there is no email.. 

>> tail /etc/pulp/server.conf
[email]
host: localhost
port: 25
from: pulp.com
enabled: true

>> telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 localhost ESMTP Postfix
EHLO
501 Syntax: EHLO hostname
EHLO milan
250-localhost
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
 SUBJECT milan
502 5.5.2 Error: command not recognized
^C^]
telnet> Connection closed.

>> grep -i avc /var/log/audit/audit.log

type=AVC msg=audit(1412173433.655:2411): avc:  denied  { name_connect } for  pid=9661 comm="celery" dest=25 scontext=system_u:system_r:celery_t:s0 tcontext=system_u:object_r:smtp_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1412173433.665:2412): avc:  denied  { name_connect } for  pid=9661 comm="celery" dest=25 scontext=system_u:system_r:celery_t:s0 tcontext=system_u:object_r:smtp_port_t:s0 tclass=tcp_socket

Actual results:
no any email


Expected results:
new email in the mailbox

Comment 1 Brian Bouterse 2014-10-02 18:25:53 UTC
PR available at: https://github.com/pulp/pulp/pull/1183

Comment 2 Brian Bouterse 2014-10-02 19:04:34 UTC
Merged to 2.5-testing -> 2.5-dev -> master

Comment 3 Chris Duryee 2014-10-02 23:28:46 UTC
pulp-2.5.0-0.7.beta

Comment 4 Irina Gulina 2014-10-03 10:53:49 UTC
Created attachment 943700 [details]
email received

Comment 5 Irina Gulina 2014-10-03 10:54:37 UTC
Moved to verified. See attachment. Thanks!