Installation

Email setup

Email setup

by Robert Byerly -
Number of replies: 3
Hi. Our IT staff recently installed 2.9 on a new server running Ubuntu 14.04.  We transferred over the WeBWorK database from the old server, as well as course directories, and did the "upgrade database" from the admin course.  It is configured to use our school's smtp server for mail.  Things mostly work well.

We have two strange problems, both connected with email.  Whenever an instructor sends email to students in a section, the "Reply-to" field is always set to the email address of our IT department.  This is annoying the guys in IT.  In the email page we've tried being careful about filling in the "From" and "Reply-to" field, saving the default message, etc.  Nothing seems to work.

I've grepped the contents of the configuration directory, all regular files under webwork2/lib and the course directory to try to figure out where WeBWorK is getting this email address from.  (Or could it be being inserted by Perl?)  Unless WeBWorK is clairvoyant I don't see where it's coming from.  I even did an ASCII dump of all the database tables from some of the affected courses to se if I could find this email address in them somewhere.

The second problem seems related.  I'm getting BCC-ed on all messages from instructors to their students as well.  I am in the admin course and have my name added as a professor to all newly created sections (so I can help troubleshoot if necessary) but I made sure my email address is not associated with that username.

Does anyone know where WeBWorK may be getting these addresses from?

Thanks.
Bob
In reply to Robert Byerly

Re: Email setup

by Danny Glin -
I had two ideas:
1. Elsewhere in the code WeBWorK grabs the ServerAdmin directive from the apache configuration to display an email address on error pages, however it doesn't look like this value shows up anywhere in the send mail code.

2. Something in the configuration of your email server is setting the reply-to address on emails.  Are you using the WeBWorK server itself to send emails, or do you have an external server set in site.conf using $mail{smtpServer}? In either case, is $mail{smtpSender} set to the IT department email address?
In reply to Danny Glin

Re: Email setup

by Robert Byerly -
1. It's not using the ServerAdmin email address.

2.  $mail{smtpServer} is set to our university's smtp server.  $mail{smtpSender} is set to a dummy but well-formed email address.  We could try changing $mail{smtpServer} to localhost (although it would wind up being relayed to the same smtp server in the end.)  

Sadly, we didn't notice these problems until the system was put into production.
In reply to Robert Byerly

Re: Email setup

by Robert Byerly -
OK.  Thanks to those who thought about this problem.  It turned out to be a perl issue.  When installing WeBWorK, our IT guy had to install the perl module Mail::Sender.  Somehow in the process a file "Sender.config" got created in the perl library which contained defaults for both the bcc field and the reply-to field.  These defaults were not being overridden by WeBWorK -- hence the strange behavior.

Now I just have to delete the 2000 emails from WeBWorK I've received in the last week.

Bob