Tags:
create new tag
, view all tags

Question

The SMTP server I need to connect to requires authentication, yet I'm not seeing where or how to include my username and password for this server in my twiki installation. I did stumble across:

UsingSmtpMailServerAuthentication

but the problem is that the poster says that the solution doesn't work, while I'm not sure how the newer Perl version (which I am using) solves this problem. Could someone who knows something about PERL and TWiki please advise.

Thanks

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Fedora Core 4
Web server: Apache httpd-2.0.54-10.3
Perl version: 5.8.6
Client OS: Fedora
Web Browser: Firefox
Categories: Authentication

-- CraigAumann - 04 May 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Some weeks ago I've advised the same hack in HtpasswdRegistration (at the end of a long story) and it worked with plain Net::SMTP - but I was careless enough not to call ok. Anyway, the code in UsingSmtpMailServerAuthentication is broken because it returns unconditionally. Try to replace:

     $smtp -> auth('mrjcleaver', 'mypassword');                              
     my $status = ($smtp->ok() ? "" : "ERROR: Can't authenticate using Net::SMTP ". $smtp->message);                                                             
-    return $status;
+    return $status if $status;

     my $status = "";   

-- HaraldJoerg - 04 May 2006

Thanks! I made these changes. Problem now is, I have no idea how to test whether it is working as I know nothing about PERL. Just running the notification script doesn't seem to work (meaning I didn't get an email) and /data/logxxx and /data/warnxxx both say nothing.

-- CraigAumann - 05 May 2006

What type of mails are you trying to create?

  • For mails about user registration you'd have to register a new user
  • For notification about new topics you have to first register in a web's WebNotify topic, then to change a topic, and then to run mailnotify.
Go to your installation's tools directory and run
perl -I ../bin mailnotify

Check your local TWiki/MailerContrib about the parameters of the mailnotify script.

-- HaraldJoerg - 05 May 2006

Thanks! Originally, such notifications were sent by sendmail. But sendmail wasn't set-up right... So I hoped that the above would provide an easier work around. I've switched to Postfix which may have resolved the problem.

Thanks for your thoughts.

-- CraigAumann - 06 May 2006

 
Topic revision: r5 - 2006-05-06 - CraigAumann
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.