Re: [Errno 13] Permission denied error when sending emails
Hi all (and Stephen), Looks like there are problems beyond SELinux here. However in case you haven't already, you'll need adjust SELinux so that httpd (which is running the RB Django code via mod_wsgi) is allowed make outbound TCP connections to port 25. $ sudo setsebool -P httpd_can_sendmail 1 HTH, Paul On Thursday, November 13, 2014 10:17:22 AM UTC, Yang wrote: Hello Michaela, Could you please explain more how you fixed this issue? I meet the same problem of sending emails in web2py running on Apache (CentOS). Thanks! On Tuesday, August 20, 2013 7:03:51 PM UTC+2, Michaela Newell wrote: Actually, figured out what the last bits were it was because I had TLS ticked but my server didn't have it. Fixed now :) Thanks very much. Your command audit2allow -a did not work however. On Tuesday, 20 August 2013 17:34:39 UTC+1, Michaela Newell wrote: Hi Stephan, Thanks for reply. It is RHEL/CentOS 6. It did not go away when I tried the command but the error message has changed. Output from log now is: - Error sending e-mail notification with subject 'Review Request 2: gfhgf' on behalf of ' .x...@.com' to ' .x...@.com': STARTTLS extension not supported by server. Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 51, in open self.connection.starttls() File /usr/lib64/python2.6/smtplib.py, line 611, in starttls raise SMTPException(STARTTLS extension not supported by server.) SMTPException: STARTTLS extension not supported by server. The audit2allow -a command came back with command not found, running as root. Michaela On Tuesday, 20 August 2013 14:48:30 UTC+1, Stephen Gallagher wrote: On 08/20/2013 09:46 AM, Michaela Newell wrote: I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? Is this RHEL/CentOS 6? It's possibke that SELinux might be interfering. Does it go away if you do 'setenforce 0' as root? If so, please run the command: audit2allow -a and send me the output. -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Errno 13] Permission denied error when sending emails
Hello Michaela, Could you please explain more how you fixed this issue? I meet the same problem of sending emails in web2py running on Apache (CentOS). Thanks! On Tuesday, August 20, 2013 7:03:51 PM UTC+2, Michaela Newell wrote: Actually, figured out what the last bits were it was because I had TLS ticked but my server didn't have it. Fixed now :) Thanks very much. Your command audit2allow -a did not work however. On Tuesday, 20 August 2013 17:34:39 UTC+1, Michaela Newell wrote: Hi Stephan, Thanks for reply. It is RHEL/CentOS 6. It did not go away when I tried the command but the error message has changed. Output from log now is: - Error sending e-mail notification with subject 'Review Request 2: gfhgf' on behalf of ' .x...@.com' to ' .x...@.com': STARTTLS extension not supported by server. Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 51, in open self.connection.starttls() File /usr/lib64/python2.6/smtplib.py, line 611, in starttls raise SMTPException(STARTTLS extension not supported by server.) SMTPException: STARTTLS extension not supported by server. The audit2allow -a command came back with command not found, running as root. Michaela On Tuesday, 20 August 2013 14:48:30 UTC+1, Stephen Gallagher wrote: On 08/20/2013 09:46 AM, Michaela Newell wrote: I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? Is this RHEL/CentOS 6? It's possibke that SELinux might be interfering. Does it go away if you do 'setenforce 0' as root? If so, please run the command: audit2allow -a and send me the output. -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Errno 13] Permission denied error when sending emails
I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Errno 13] Permission denied error when sending emails
On 08/20/2013 09:46 AM, Michaela Newell wrote: I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? Is this RHEL/CentOS 6? It's possibke that SELinux might be interfering. Does it go away if you do 'setenforce 0' as root? If so, please run the command: audit2allow -a and send me the output. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Errno 13] Permission denied error when sending emails
Hi Stephan, Thanks for reply. It is RHEL/CentOS 6. It did not go away when I tried the command but the error message has changed. Output from log now is: - Error sending e-mail notification with subject 'Review Request 2: gfhgf' on behalf of ' .x...@.com' to ' .x...@.com': STARTTLS extension not supported by server. Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 51, in open self.connection.starttls() File /usr/lib64/python2.6/smtplib.py, line 611, in starttls raise SMTPException(STARTTLS extension not supported by server.) SMTPException: STARTTLS extension not supported by server. The audit2allow -a command came back with command not found, running as root. Michaela On Tuesday, 20 August 2013 14:48:30 UTC+1, Stephen Gallagher wrote: On 08/20/2013 09:46 AM, Michaela Newell wrote: I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? Is this RHEL/CentOS 6? It's possibke that SELinux might be interfering. Does it go away if you do 'setenforce 0' as root? If so, please run the command: audit2allow -a and send me the output. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Errno 13] Permission denied error when sending emails
Actually, figured out what the last bits were it was because I had TLS ticked but my server didn't have it. Fixed now :) Thanks very much. Your command audit2allow -a did not work however. On Tuesday, 20 August 2013 17:34:39 UTC+1, Michaela Newell wrote: Hi Stephan, Thanks for reply. It is RHEL/CentOS 6. It did not go away when I tried the command but the error message has changed. Output from log now is: - Error sending e-mail notification with subject 'Review Request 2: gfhgf' on behalf of ' .x...@.com' to ' .x...@.com': STARTTLS extension not supported by server. Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 51, in open self.connection.starttls() File /usr/lib64/python2.6/smtplib.py, line 611, in starttls raise SMTPException(STARTTLS extension not supported by server.) SMTPException: STARTTLS extension not supported by server. The audit2allow -a command came back with command not found, running as root. Michaela On Tuesday, 20 August 2013 14:48:30 UTC+1, Stephen Gallagher wrote: On 08/20/2013 09:46 AM, Michaela Newell wrote: I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? Is this RHEL/CentOS 6? It's possibke that SELinux might be interfering. Does it go away if you do 'setenforce 0' as root? If so, please run the command: audit2allow -a and send me the output. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Errno 13] Permission denied error when sending emails
On 08/20/2013 12:34 PM, Michaela Newell wrote: Hi Stephan, Thanks for reply. It is RHEL/CentOS 6. It did not go away when I tried the command but the error message has changed. Output from log now is: - Error sending e-mail notification with subject 'Review Request 2: gfhgf' on behalf of ' .x...@.com' to ' .x...@.com': STARTTLS extension not supported by server. Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 51, in open self.connection.starttls() File /usr/lib64/python2.6/smtplib.py, line 611, in starttls raise SMTPException(STARTTLS extension not supported by server.) SMTPException: STARTTLS extension not supported by server. Ok, so that's a different problem, which *does* mean that the initial permission denied error was caused by SELinux. So we'll work on that next. This error above tells me that you misconfigured your email configuration. It's trying to use TLS for communicating with the SMTP server, which that server doesn't support. You probably need to confer with your mail administrator for what the proper settings are there. The audit2allow -a command came back with command not found, running as root. You need to do 'yum install /usr/bin/audit2allow' if you don't already have it. Michaela On Tuesday, 20 August 2013 14:48:30 UTC+1, Stephen Gallagher wrote: On 08/20/2013 09:46 AM, Michaela Newell wrote: I am attempting to set-up emails. I have all three options selected and a valid smtp server. When I add a new user the logs show nothing but the email does not get sent. When I add a new review request I get this in the log: - Error sending e-mail notification with subject 'Review Request 1: ...' on behalf of ' .x...@.com' to ' .x...@.com': [Errno 13] Permission denied Traceback (most recent call last): File /usr/lib/python2.6/site-packages/reviewboard/notifications/email.py, line 244, in send_review_mail message.send() File /usr/lib/python2.6/site-packages/django/core/mail/message.py, line 248, in send return self.get_connection(fail_silently).send_messages([self]) File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 85, in send_messages new_conn_created = self.open() File /usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py, line 48, 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 567, in create_connection raise error, msg error: [Errno 13] Permission denied Does anyone know of any causes? Is this RHEL/CentOS 6? It's possibke that SELinux might be interfering. Does it go away if you do 'setenforce 0' as root? If so, please run the command: audit2allow -a and send me the output. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed