• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

After this morning's registration change I can register a user but get this error:

 Thank you for registering

    * You can review your changes in your personal TWiki topic TestTest7
      (Suggestion: How about uploading your picture to your topic?)
    * You are also listed in the TWikiUsers topic 

Warning: Could not send confirmation email

ERROR: Can't send mail using TWiki::cfg{MailProgram} at /opt/csw/share/perl/5.8.8/CGI/Carp.pm line 314. at /opt/csw/share/perl/5.8.8/CGI/Carp.pm line 314

CGI::Carp::realdie('ERROR
    Can\'t send mail using TWiki::cfg{MailProgram}') called at /opt/csw/share/perl/5.8.8/CGI/Carp.pm line 385 
CGI::Carp::die('ERROR
    Can\'t send mail using TWiki::cfg{MailProgram}') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/Net.pm line 228 TWiki::Net::_sendEmailBySendmail('TWiki::Net=HASH(0x88a5ac)', 'Date: Wed, 31 May 2006 20:39:10 GMT\x{a}From: TWiki Administrator...') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/Net.pm line 191 TWiki::Net::__ANON__() called at /home/pthoeny/twiki/TWikiRelease04x00/lib/CPAN/lib///Error.pm line 379 eval {...} called at /home/pthoeny/twiki/TWikiRelease04x00/lib/CPAN/lib///Error.pm line 371 Error::subs::try('CODE(0x773034)', 'HASH(0xa6a3d0)') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/Net.pm line 207 TWiki::Net::sendEmail('TWiki::Net=HASH(0x88a5ac)', 'From: TWiki Administrator <webmaster@example.com>\x{a}To: test te...') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/UI/Register.pm line 953 TWiki::UI::Register::_emailRegistrationConfirmations('TWiki=HASH(0x1c189c)', 'HASH(0xa4b114)') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/UI/Register.pm line 792 TWiki::UI::Register::finish('TWiki=HASH(0x1c189c)') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/UI/Register.pm line 380 TWiki::UI::Register::registerAndNext('TWiki=HASH(0x1c189c)', '/home/pthoeny/twiki/TWikiRelease04x00/data/RegistrationApprovals') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/UI/Register.pm line 90 TWiki::UI::Register::register_cgi('TWiki=HASH(0x1c189c)') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/UI.pm line 109 TWiki::UI::__ANON__() called at /home/pthoeny/twiki/TWikiRelease04x00/lib/CPAN/lib///Error.pm line 379 eval {...} called at /home/pthoeny/twiki/TWikiRelease04x00/lib/CPAN/lib///Error.pm line 371 Error::subs::try('CODE(0xa09714)', 'HASH(0xa49980)') called at /home/pthoeny/twiki/TWikiRelease04x00/lib/TWiki/UI.pm line 158 TWiki::UI::run('CODE(0x826e10)') called 

Too many failures sending mail 

Here is the relevant part of configure:

$cfg{Register}{NeedVerification} = $FALSE;
$TWiki::cfg{MailProgram} = '/dev/null';

Main.TWikiPreferences is the default.

This is on Solaris.

I think it is better to add a {DisableMail} flag to configure to send all mail (registration, change notify) to the bit bucket. This is a special case during installation and scheduled maintenance.

Admins should get notified of e-mail issues in normal operation though (e.g. don't silently drop e-mail errors if {DisableMail} flag is off.

-- PTh

Peter, please stop trying to irritate me into adding a configuration flag. The right way to configure this is to have a drop down to select between 'none', 'SMTP' and 'MailProgram'. But I'm not going to add the code because the risk is too high. A boolean that disables the mailer is just another compatibility problem for the future.

Note that silently dropping email errors is a bad idea, as was highlighted when I suggested it previously.

The mail program option has to be a valid target of a perl pipe i.e. it has to be execable, so /dev/null is not a valid target. You can use

$TWiki::cfg{MailProgram} = 'cat>/dev/null';
However this is rather inelegant. So I modified the code so that if
$TWiki::cfg{MailProgram} = '';
it doesn't attempt to send mail.

CC

Thanks for the workaround fix.

I see that we agree now that a drop down to select between 'none', 'SMTP' and 'MailProgram' is the best option (after the 4.0.3. release)

-- PTh

And as written on Item2374 I added an extra line of help text to the two mail options in configure so the admins knows that blank fields for SMTP and MailProgram disabled all outgoing mail. It is a good and logical work around. No worries.

KJL

For some reason that didn't work out: even though an outgoing SMTP host was configured and it set the $handler in Net.pm it was nulling it again later. Checking in a fix ...

MD

ItemTemplate
Summary Allow registration without a running e-mail service (error during registration using TWiki::Net::_sendEmailBySendmail)
ReportedBy TWiki:Main.PeterThoeny
Codebase ~twiki4
SVN Range Tue, 30 May 2006 build 10392
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins 10411 10427 10431
TargetRelease patch
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2006-06-08 - SteffenPoulsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback