After we upgraded our webwork 2.13 server to Ubuntu 18.04 we discovered that students can't email their instructors. It used to work a few months ago, but now when I try it I get this error message
Failed to send message: 5.7.1 : Relay access denied Trace begun at /usr/share/perl5/Email/Sender/Transport/SMTP.pm line 218 Email::Sender::Transport::SMTP::send_email('Email::Sender::Transport::SMTP=HASH(0x56130729a718)', 'Email::Abstract=ARRAY(0x561307285778)', 'HASH(0x561307285dd8)') called at /usr/share/perl5/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} at /usr/share/perl5/Try/Tiny.pm line 102 eval {...} at /usr/share/perl5/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x56130736ecb8)', 'Try::Tiny::Catch=REF(0x56130727bd50)') called at /usr/share/perl5/Email/Sender/Role/CommonSending.pm line 58 Email::Sender::Role::CommonSending::send('Email::Sender::Transport::SMTP=HASH(0x56130729a718)', 'Email::Abstract=ARRAY(0x561307285778)', 'HASH(0x56130736ace0)') called at /usr/share/perl5/Email/Sender/Simple.pm line 119 Email::Sender::Simple::send_email('Email::Sender::Simple', 'Email::Abstract=ARRAY(0x561307285778)', 'HASH(0x56130727b3c0)') called at /usr/share/perl5/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} at /usr/share/perl5/Try/Tiny.pm line 102 eval {...} at /usr/share/perl5/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x561307285d48)', 'Try::Tiny::Catch=REF(0x561307277870)') called at /usr/share/perl5/Email/Sender/Role/CommonSending.pm line 58 Email::Sender::Role::CommonSending::send('Email::Sender::Simple', 'Email::Simple=HASH(0x561303e832a8)', 'HASH(0x561307285190)') called at /usr/share/perl5/Sub/Exporter/Util.pm line 18 Sub::Exporter::Util::__ANON__('Email::Simple=HASH(0x561303e832a8)', 'HASH(0x561307285190)') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Feedback.pm line 322 WeBWorK::ContentGenerator::Feedback::try {...} at /usr/share/perl5/Try/Tiny.pm line 102 eval {...} at /usr/share/perl5/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x561307277150)', 'Try::Tiny::Catch=REF(0x561307277138)') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Feedback.pm line 329 WeBWorK::ContentGenerator::Feedback::body('WeBWorK::ContentGenerator::Feedback=HASH(0x561305f916d0)', 'HASH(0x56130722c2a0)') called at /opt/webwork/webwork2/lib/WeBWorK/Template.pm line 155 WeBWorK::Template::template('/opt/webwork/webwork2/htdocs/themes/math4/system.template', 'WeBWorK::ContentGenerator::Feedback=HASH(0x561305f916d0)') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 560 WeBWorK::ContentGenerator::content('WeBWorK::ContentGenerator::Feedback=HASH(0x561305f916d0)') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 232 WeBWorK::ContentGenerator::go('WeBWorK::ContentGenerator::Feedback=HASH(0x561305f916d0)') called at /opt/webwork/webwork2/lib/WeBWorK.pm line 384 WeBWorK::dispatch('Apache2::RequestRec=SCALAR(0x561305d0b978)') called at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 121 eval {...} at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 121 Apache::WeBWorK::handler('Apache2::RequestRec=SCALAR(0x561305d0b978)') called at -e line 0 eval {...} at -e line 0
The mail.log reports
Sep 20 18:23:17 math postfix/smtpd[30563]: connect from localhost[127.0.0.1]
Sep 20 18:23:17 math postfix/smtpd[30563]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <gjennings@csudh.edu>: Relay access denied; from=<gjennings@localhost> to=<gjennings@csudh.edu> proto=ESMTP helo=<localhost.localdomain>
Sep 20 18:23:17 math postfix/smtpd[30563]: lost connection after RCPT from localhost[127.0.0.1]
Sep 20 18:23:17 math postfix/smtpd[30563]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 commands=2/3
I can send mail out from the server using mutt so I think we're not being blocked.
I tested perl Email::sender using the script I found on
https://metacpan.org/pod/Email::Sender::Manual::QuickStart
to send a message out. That worked too.
Ubuntu 18.04 uses postfix to send mail.
If somebody has seen this problem and cured it please let me know!
Best,
George