Question
I'm having problems setting up Net::SMTP mail. When I try to add a user or change a user's password (which requires sending mail to the user) I get the following (see below).
This occurs even with SELinux totally disabled.
How can I figure out what is going wrong?
ERROR
Can't send mail using Net::SMTP. <craig.aumann@arc.ab.ca>: Relay access denied at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 356
CGI::Carp::realdie('ERROR
Can\'t send mail using Net::SMTP. <craig.aumann@arc.ab...') called at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 437
CGI::Carp::die('ERROR
Can\'t send mail using Net::SMTP. <craig.aumann@arc.ab...') called at /RAID/twiki/lib/TWiki/Net.pm line 366 TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0x43451a0)', 'Date: Thu, 03 May 2007 22:35:33 GMT\x{a}From: TWiki Administrator...') called at /RAID/twiki/lib/TWiki/Net.pm line 244 TWiki::Net::__ANON__() called at /RAID/twiki/lib/CPAN/lib//Error.pm line 379 eval {...} called at /RAID/twiki/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x4721650)', 'HASH(0x48bf050)') called at /RAID/twiki/lib/TWiki/Net.pm line 260 TWiki::Net::sendEmail('TWiki::Net=HASH(0x43451a0)', 'From: TWiki Administrator <caumann@pobox.com>\x{a}To: FooBar <cra...') called at /RAID/twiki/lib/TWiki/UI/Register.pm line 1178 TWiki::UI::Register::_sendEmail('TWiki=HASH(0x362b080)', 'mailresetpassword', 'HASH(0x44a6030)') called at /RAID/twiki/lib/TWiki/UI/Register.pm line 562 TWiki::UI::Register::_resetUsersPassword('TWiki=HASH(0x362b080)', 'FooBar', '', 'SCALAR(0x42ca460)') called at /RAID/twiki/lib/TWiki/UI/Register.pm line 510 TWiki::UI::Register::resetPassword('TWiki=HASH(0x362b080)') called at /RAID/twiki/lib/TWiki/UI/Register.pm line 148 TWiki::UI::Register::passwd_cgi('TWiki=HASH(0x362b080)') called at /RAID/twiki/lib/TWiki/UI.pm line 159 TWiki::UI::__ANON__() called at /RAID/twiki/lib/CPAN/lib//Error.pm line 379 eval {...} called at /RAID/twiki/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x362a4d0)', 'HASH(0x4705250)') called at /RAID/twiki/lib/TWiki/UI.pm line 199 TWiki::UI::run('CODE(0x42a8d10)') called
Environment
--
CraigAumann - 03 May 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The chances are that you haven't set a valid email address for the webmaster. Relay is usually denied because the domain the email is coming from is not recognised.
--
CrawfordCurrie - 06 May 2007
When I change the configuration file, some errors are showing up in the httpd/error.log file:
[Mon May 07 18:11:24 2007] [error] [client 127.0.0.1] Subroutine TWiki::Configure::Checker::tmpfile redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65., referer: http://lups.arc.ab.ca/twiki/bin/configure
[Mon May 07 18:11:24 2007] [error] [client 127.0.0.1] at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/POSIX.pm line 19, referer: http://lups.arc.ab.ca/twiki/bin/configure
[Mon May 07 18:11:24 2007] [error] [client 127.0.0.1] Subroutine TWiki::Configure::Checker::tmpnam redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65., referer: http://lups.arc.ab.ca/twiki/bin/configure
[Mon May 07 18:11:24 2007] [error] [client 127.0.0.1] at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/POSIX.pm line 19, referer: http://lups.arc.ab.ca/twiki/bin/configure
Is this part of the problem?
Now I get the relay access when I try to reset the password. Is it bitching about the referer being
http://lups.arc.ab.ca
etc...?
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP>>> Net::SMTP(2.30), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP>>> Net::Cmd(2.27), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP>>> Exporter(5.58), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP>>> IO::Socket::INET(1.31), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP>>> IO::Socket(1.30), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP>>> IO::Handle(1.27), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 220 sceptre.sasl.smtp.pobox.com ESMTP Postfix (Debian/GNU), referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)>>> EHLO pobox.com\r, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-sceptre.sasl.smtp.pobox.com, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-PIPELINING, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-SIZE 10240000, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-ETRN, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-STARTTLS, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-AUTH LOGIN PLAIN, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250-AUTH=LOGIN PLAIN, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250 8BITMIME, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)>>> MAIL FROM:<caumann@pobox.com>\r, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 250 Ok, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:05 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)>>> RCPT TO:<caumann@pobox.com>\r, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
[Mon May 07 18:13:06 2007] [error] [client 127.0.0.1] Net::SMTP=GLOB(0x25e66d0)<<< 554 <caumann@pobox.com>: Relay access denied, referer: http://lups.arc.ab.ca/twiki/bin/view/TWiki/ResetPassword
--
CraigAumann - 08 May 2007
Is this part of the problem? -
No
I don't understand what you are reporting; what you have shown above is a fragment of log I would expect to see when SMTP debug is enabled....
--
CrawfordCurrie - 14 May 2007
The problem was I was missing some perl modules, in particular perl-authen-sasl (Authen::SASL) and perl-GSSAPI. Once these were installed, everything works with my particular external mail provider.
--
CraigAumann - 20 May 2007