faq1Add my vote for this tag create new tag
, view all tags


Im having a problem with the user activation function of the twiki user registration. After using the twiki user registration, my user recives the email containing the verification code. Once the user enters the verification code or follows the link in the email, twiki errors. I have no idea what is wrong with it because it sends the inital email and then errors on activation. Please help!

Error Contents: (the email addresses have been replaced with *** but they are correct)

An e-mail could not be delivered. Please notify your TWiki administrator, ***************

Mail to: ERROR: Can't send mail using Net::SMTP. Bad recipient address syntax

CGI::Carp::realdie('ERROR Can\'t send mail using Net::SMTP. Bad recipient addres...') called at /usr/lib/perl5/5.8.0/CGI/Carp.pm line 371 CGI::Carp::die('ERROR Can\'t send mail using Net::SMTP. Bad recipient addres...') called at /var/www/html/twiki/lib/TWiki/Net.pm line 301 TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0xa1f61f8)','Date Wed, 29 Mar 2006 19:46:28 GMT\x{a}From: TWiki Administrator...') called at /var/www/html/twiki/lib/TWiki/Net.pm line 192 TWiki::Net::__ANON__() called at /var/www/html/twiki/lib/CPAN/lib///Error.pm line 387 eval {...} called at /var/www/html/twiki/lib/CPAN/lib///Error.pm line 379 Error::subs::try('CODE(0xa444c3c)','HASH(0xa4a90dc)') called at /var/www/html/twiki/lib/TWiki/Net.pm line 208 TWiki::Net::sendEmail('TWiki::Net=HASH(0xa1f61f8)','From TWiki Administrator <***********>\x{a}To: Test User ...') called at /var/www/html/twiki/lib/TWiki/UI/Register.pm line 937 TWiki::UI::Register::_emailRegistrationConfirmations('TWiki=HASH(0x9b5dcc0)','HASH(0xa40f614)') called at /var/www/html/twiki/lib/TWiki/UI/Register.pm line 751 TWiki::UI::Register::finish('TWiki=HASH(0x9b5dcc0)','/var/www/html/twiki/data/RegistrationApprovals') called at /var/www/html/twiki/lib/TWiki/UI/Register.pm line 89 TWiki::UI::Register::register_cgi('TWiki=HASH(0x9b5dcc0)') called at /var/www/html/twiki/lib/TWiki/UI.pm line 97 TWiki::UI::__ANON__() called at /var/www/html/twiki/lib/CPAN/lib///Error.pm line 387 eval {...} called at /var/www/html/twiki/lib/CPAN/lib///Error.pm line 379 Error::subs::try('CODE(0xa41f6d4)','HASH(0xa426ef4)') called at /var/www/html/twiki/lib/TWiki/UI.pm line 146 TWiki::UI::run('CODE(0x9d1deb8)') called

Too many failures sending mail

Errors: %PARAM2%


TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat Enterprise Linux 3, kernel 2.4.21-40.EL
Web server: Apache/2.0.46
Perl version: 5.8.7
Client OS: MS Windows XP Professional, Service pack 2
Web Browser: Mozilla Firefox
Categories: Registration, Mail

-- TWikiGuest - 29 Mar 2006


ALERT! 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.

Have a look at the /TWiki/TWikiPreferences page, and especially for the setting of the variable WIKIWEBMASTER. This needs to be customized in /Main/TWikiPreferences to your mail address.

The initial mail, asking for confirmation, goes to the registrant only - but after that TWiki wants to send a mail to both the user and WIKIWEBMASTER to inform about a successful registration.

-- HaraldJoerg - 29 Mar 2006

This is set correctly in the /TWiki/TWikiPreferences page. I also added it to the /Main/TWikiPreferences page but I recieve the same error.

-- KyleBlanch - 30 Mar 2006

I this related to an upgrade? Are there by any chance template files used from an earier TWiki installation?

-- PeterThoeny - 30 Mar 2006

Nope, this is a completely fresh install. We are just beginning to investigate TWiki.

-- KyleBlanch - 30 Mar 2006

One really strange thing is that Net::SMTP complains though it is instructed by TWiki's Net.pm to silently skip bad addresses. So maybe other installations would have the same error, only their Net::SMTP successfully suppresses the message.

The code which extracts mail addresses from the mail template is not exactly conforming to the spec, so maybe some versions of Net::SMTP, or of the SMTP engine, don't like it.

You could check with a four-letter patch:

Index: lib/TWiki/UI/Register.pm
--- lib/TWiki/UI/Register.pm    (revision 9602)
+++ lib/TWiki/UI/Register.pm    (working copy)
@@ -976,7 +976,7 @@
     my ( $session, $data, $templateText, $hidePassword ) = @_;
     $data->{Name} ||= $data->{WikiName};
-    $templateText =~ s/%FIRSTLASTNAME%/$data->{Name}/go;
+    $templateText =~ s/%FIRSTLASTNAME%/$data->{WikiName}/go;
     $templateText =~ s/%WIKINAME%/$data->{WikiName}/go;
     $templateText =~ s/%EMAILADDRESS%/$data->{Email}/go;

-- HaraldJoerg - 30 Mar 2006

I implemented this and recieved the same error.

-- KyleBlanch - 31 Mar 2006

Well, I'm short of ideas. Let's try another approach: What's the version of your Net::SMTP module (say perl -MNet::SMTP -e 'print $Net::SMTP::VERSION' to your computer)? I have 2.29, where bad addresses are ignored, and Net::SMTP some nonstandard address syntax. If your version is lower, check ( perldoc Net::SMTP) whether your Net::SMTP supports the SkipBad option. If not, we're lucky: upgrading Net::SMTP should be a workaround.

-- HaraldJoerg - 31 Mar 2006

Seems were unlucky yet again, I am also running 2.29.

-- KyleBlanch - 03 Apr 2006

It would be very helpful to know what the "bad recipient address" actually is. We could then work back to where it is coming from.

-- CrawfordCurrie - 05 Apr 2006

I agree, but the error message does not specify what the "bad recipient address" is. Any ideas where I could retrieve this from?

-- KyleBlanch - 05 Apr 2006

Unfortunately Net::SMTP does hide this information very well, and TWiki's module is processing a list of mail addresses. You could, if you are familiar with Perl, try to write a tiny program using Net::SMTP and feed it one mail address at a time - or change TWiki to send one mail per address, so that it can record the addresses to STDERR. It would be really interesting to trace into Net::SMTP why it ignores the SkipBad parameter which TWiki passes.

-- HaraldJoerg - 05 Apr 2006

Closing this due to no further activity.

-- PeterThoeny - 01 Jun 2006

any conclusion to this issue?

-- HockWahOng - 07 Jun 2006

I just had a similar problem and read this thread to solve it. I was running on RedHat 9 and upgrading the perl module Net::SMTP fixed the issue. Thanks...

-- RickDillon - 09 Jun 2006

I can also confirm that I had the exact same problem and upgrading Net::SMTP fixed the problem. The CPAN output indicated libnet-1.19 was installed.

-- BillKayser - 13 Jun 2006

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2012-02-22 - JamieBenjamin
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.