WeBWorK Problems

Send mail via "Email Instructor" button fails

Send mail via "Email Instructor" button fails

by Frank Cavadi -
Number of replies: 6
We are having a problem with the "Email Instructor" button on the homework sets. An editor will open, but when you try to "Send Email" we get this error:

Failed to open the mailer: connect() failed: Permission denied

Tried this in every course at multiple user levels (admin, professor, and student) and received the same error every time. According to the documentation, the default permission level for send_feedback is "student" and no options are changed in the course.conf file for any of these classes regarding sending or receiving feedback.

Wne sending mail manually, Postfix/sendmail works and smtp server address port is setup properly.

Currently, in /opt/webwork/webork2/conf/site.conf:

$mail{smtpSender} = "webwork@localhost";

We've tested sending email , manually from Linux OS prompt, from that and it works.
In reply to Frank Cavadi

Re: Send mail via "Email Instructor" button fails

by Michael Gage -
Try setting $tls_allowed=0

# TLS is a method for providing secure connections to the smtp server.
# https://en.wikipedia.org/wiki/Transport_Layer_Security
# At some sites coordinating the certificates properly is tricky
# Set this value to 0 to avoid checking certificates.
# Set it to 0 to trouble shoot an inability to verify certificates with the smtp server

$tls_allowed = 1;  


this might also be relevant if that doesn't work.  It could be a firewall issue:

In reply to Michael Gage

Re: Send mail via "Email Instructor" button fails

by Frank Cavadi -
$tls_allowed=0 didn't work same error:

Failed to open the mailer: connect() failed: Permission denied

Do Ihave to put port number after server name?
$mail{smtpServer} = "<smtpserver.domain.xxx>:<port#>";

I tried using the webwork server name (it failed withs ame error)
here as I know it can "send" email. Not sure about receiving email,
though.





In reply to Frank Cavadi

Re: Send mail via "Email Instructor" button fails

by Frank Cavadi -
I fixed the issue via selinux:

setsebool -P httpd_can_sendmail on

Earlier in thread, I mentioned we were
able to send mail successfully. But, that
was via connecting to smtp server and it's port.
In reply to Frank Cavadi

Re: Send mail via "Email Instructor" button fails

by Frank Cavadi -
Since the selinux fixed the issue per sendmail, I have
also reset tls_allowed to my original default setting:

$tls_allowed = 1;

In /opt/webwork/webwork2/con/site.conf file.
"Email to Instructor" button function continued to work.
In reply to Frank Cavadi

Re: Send mail via "Email Instructor" button fails

by Jack Dockery -
we have a different problem the message goes through but the student sees a pink screen with the following:

WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

Warning messages

  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 317, line 10.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 317, line 10.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 321, line 10.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 321, line 10.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 317, line 11.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 317, line 11.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 321, line 11.
  • Use of uninitialized value in string ne at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 321, line 11.
  • Use of uninitialized value $Mail::Sender::ver in concatenation (.) or string at /usr/local/share/perl/5.22.1/Mail/Sender.pm line 1235, line 11.
How do I fix this?
In reply to Jack Dockery

Re: Send mail via "Email Instructor" button fails

by Arnold Pizer -
Does the Apache error log which for Ubuntu is located at /var/log/apache2/error.log give any additional information?

Also is this a new setup or has there been a recent change that may have caused this problem?

Arnie