WeBWorK Main Forum

WeBWorK SMTP Issues

WeBWorK SMTP Issues

by Andrew Parker -
Number of replies: 3
I'm having trouble with my college's SMTP server. Emails sent from within WeBWorK fail at a very high rate, but every who-knows-how-often one will get through.

They're running MailEnable (I'm unsure of the version) and apparently my WeBWorK server is generating a lot of these:

02/10/13 12:02:49 ME-E0069: (recv) socket [540] disconnection from host <<webworkIP>> before any command received. Error: (10054)

However, every once in a great while, mail goes through as expected:

02/10/13 14:25:27 ME-I0107: [700] Relay Granted: Sender IP (<<webworkIP>>) is within an authorized IP range.
02/10/13 14:25:27 ME-I0149: [700] 6B730598D7D24E2695DD85434CBDFFCA.MAI was received successfully and delivery thread was initiated

If I understand the first error message correctly, it seems as though the WeBWorK server is terminating the connection before initiating the email transaction. MailEnable Error #10054

Are there any WeBWorK logs I can/should check? I couldn't find any relevant ones.
In reply to Andrew Parker

Re: WeBWorK SMTP Issues

by Danny Glin -
Upon reading this, my first thought was that it is an issue with connections timing out.

One easy thing to try would be to up the value of $mail{smtpTimeout} in either global.conf or site.conf (depending on which version of WeBWorK you are running).

Danny
In reply to Danny Glin

Re: WeBWorK SMTP Issues

by Andrew Parker -
Normally, the E-mail Instructor page just sits there when you hit the 'Send E-mail' button. Waiting, waiting, waiting and nothing changes. I've let it sit while I went to a meeting and it was still trying to load when I came back.

Just now, I was trying (after setting smtpTimeout to be 600) to send a test mail and the E-mail Instructor page loaded with this error:

Failed to open the mailer: connect() failed: Connection timed out

I tried, right afterwards, to send another test mail and it went through. I had several successful sent emails in a row (maybe 2-3 minutes duration) before the page returned to its usual do-nothing, won't load, state of being. It doesn't matter how many times I now attempt to send mail, from any login, nothing is going through now.
In reply to Andrew Parker

Re: WeBWorK SMTP Issues

by Andrew Parker -
I resolved this issue by installing postfix on my WeBWorK server, directing mail to localhost, and having postfix negotiate the delivery of the mail through the university SMTP server. Just a tip, in case anyone else runs into this problem in the future.