2381: E-mail notification does not work

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
#1 ryan.******@decisionscie************ (Google Code) (Is this you? Claim this profile.)
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.
  • +
    2011-11-11 13:44:18,602 - ERROR - Error sending e-mail notification with subject 'New Review Board user registration for testuser' on behalf of '"Test User" <ryan.clough@decisionsciencescorp.com>' to admin: [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 381, in mail_new_user
        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)
#2 ryan.******@decisionscie************ (Google Code) (Is this you? Claim this profile.)
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?
#3 mohsen******@gmai***** (Google Code) (Is this you? Claim this profile.)
try these commands, then restart apache and see if it works:
setsebool httpd_tmp_exec on
setsebool httpd_can_network_connect on
#4 ryan.******@decisionscie************ (Google Code) (Is this you? Claim this profile.)
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
#5 mohsen******@gmai***** (Google Code) (Is this you? Claim this profile.)
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
#6 ryan.******@decisionscie************ (Google Code) (Is this you? Claim this profile.)
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.
david
#7 david
  • +Component-Admin
david
#8 david
This is pretty obsolete.
  • +Fixed
#9 karthi******@gmai***** (Google Code) (Is this you? Claim this profile.)
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.
  • +
    2015-03-30 12:41:34,040 - DEBUG -  - DiffParser.parse: Beginning parse of diff, size = 648
    2015-03-30 12:41:34,040 - DEBUG -  - DiffParser.parse: Finished parsing diff.
    2015-03-30 12:41:36,786 - ERROR -  - Error sending e-mail notification with subject 'Review Request 63:' on behalf of 'kss2@3ds.com' to 'kss2@3ds.com'
    Traceback (most recent call last):
      File "C:\Bitnami\reviewboard-2.0.15-0\apps\reviewboard\Lib\site-packages\ReviewBoard-2.0.15-py2.7.egg\reviewboard\notifications\email.py", line 302, in send_review_mail
        message.send()
      File "C:\Bitnami\reviewboard-2.0.15-0\apps\django\django\core\mail\message.py", line 279, in send
        return self.get_connection(fail_silently).send_messages([self])
      File "C:\Bitnami\reviewboard-2.0.15-0\apps\django\django\core\mail\backends\smtp.py", line 93, in send_messages
        new_conn_created = self.open()
      File "C:\Bitnami\reviewboard-2.0.15-0\apps\django\django\core\mail\backends\smtp.py", line 53, in open
        self.connection.st