2381: E-mail notification does not work
- Fixed
- Review Board
jimcu******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
Feb. 1, 2014 |
What version are you running? 1.6 What's the URL of the page containing the problem? What steps will reproduce the problem? 1.Create a review and publish it 2. 3. What is the expected output? What do you see instead? I expect to get and e-mail notification, but I get none What operating system are you using? What browser? CentOS6. Chrome Please provide any additional information below. As admin, I have configured my email settings to turn on the notification. I specified an SMTP server that I know works as I tested it with telnet from my RB server. After configuring it. I create a new review and publish it. I do not get the e-mail notification. I turned on logging and when I look at the logfile, I see: 2011-11-10 17:14:07,188 - ERROR - Error sending e-mail notification with subject 'Review Request: test 5' on behalf of '"Jim Curtis" <jimcurtis64@gmail.com>' to '"Jim Curtis" <jimcurtis64@gmail.com>': [Errno 13] Permission denied Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/ReviewBoard-1.6.1-py2.6.egg/reviewboard/notifications/email.py", line 232, in send_review_mail message.send() File "/usr/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/django/core/mail/message.py", line 251, in send return self.get_connection(fail_silently).send_messages([self]) File "/usr/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/django/core/mail/backends/smtp.py", line 79, in send_messages new_conn_created = self.open() File "/usr/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/django/core/mail/backends/smtp.py", line 42, in open local_hostname=DNS_NAME.get_fqdn()) File "/usr/lib64/python2.6/smtplib.py", line 239, in __init__ (code, msg) = self.connect(host, port) File "/usr/lib64/python2.6/smtplib.py", line 295, in connect self.sock = self._get_socket(host, port, self.timeout) File "/usr/lib64/python2.6/smtplib.py", line 273, in _get_socket return socket.create_connection((port, host), timeout) File "/usr/lib64/python2.6/socket.py", line 514, in create_connection raise error, msg error: [Errno 13] Permission denied
I am running RB 1.6.1 in a Scientific Linux 6.1 VirtualBox 4.1.2 virtual machine. I have attached my log file with the error generated when I attempt to create a user and a confirmation email should be sent. I am using the SMTP server for other web applications and its working fine.
-
+
Upon further investigation RB is trying to send the email as the local root user and SELinux is not allowing it. If i put SELinux in Permissive mode and tail the SELinux audit log I can see where SELinux is denying root but the email goes through and despite the Email configuration in RB the email comes from root@localhost. Please help! Did I install RB wrong? Apache(httpd) is running as the apache user. Any ideas?
try these commands, then restart apache and see if it works: setsebool httpd_tmp_exec on setsebool httpd_can_network_connect on
The setsebool commands allow the email to be sent but my problem still remains: I cannot figure out why, even though I have configured a different email address in the "Email Settings", the email that is sent looks like it is coming from root@localhost. How can I fix this? Thanks for your time, Ryan CLough
as far as I know this can be caused by not configuring the SERVER_EMAIL setting in django's settings but I don't know how reviewboard modifies that, I guess u can check and change that manually if needed
I have tried your suggestion to change the django config and emails are still sent as root@localhost. Any other suggestions? I am rolling this out very soon to my developers.
Test mail i.e. mail sent after saving email settings works. I get the email notification. But when i post a review request or add a new user, i dont receive any email. using port 25 and office mail server. I tried to debug and found that test mail also goes through the same set of functions and within function open() it tries to EHLO, STARTTLS and then again EHLO. And "has_extn()" call for starttls returns False.
-
+