Registration faillure incident

This page is about an incident that avoided registration of new user. This issue was temporary fixed 31 mar. 2012. You can now Register (see TestMail2 and TestMail3) but without confirmation mail.

The issue context accepts sending mail from project web service only through TLS and SSL SMTP authentication. I have to test for foswiki configuration for both methods. Here is a list of hints :
  • see the _foswiki_'s configure script, in the Server Web Environment, if the Net::SMTP and Authen::SASL are correctly installed;
  • Test TLS and SSL SMTP : tested, see may 2012 update.

Foswiki's log

Here is the content of error.log afeter a failed registration :
2012-03-28T07:15:39Z warning SMTP auth: 500: Command unknown: 'AUTH' - Trying to send without authentication
2012-03-28T07:15:40Z warning Could not confirm registration: ERROR: Can't send mail using Net::SMTP. relay not permitted Too many failures sending mail

Possibly related issues

We could test the Email notification feature of foswiki, see

The fix

I contacted the support of and it seems we can't send mail using CGI outside the cgi-bin directory. So it seems the issue is due to two unrelated ones :
  1. We must execute CGI scripts from the cgi-bin directory;
  2. We must send mails using either TLS or SSL;

Move wiki to cgi-bin dircetory

So, during a 2012 october outage of services, I decided to move foswiki to cgi-bin directory. But a fix often result in a new issue : the wiki works but hasn't any style, as if the CSS files were absent. Open a single CSS file in your browser and you should get a HTTP error 500. This is due to the cgi-bin directory, it runs CGI scripts but cannot contain CSS files. My fix is to move the Foswiki pub/ directory to htdocs and modify the foswiki/lib/LocalSite.cfg file to point the PubUrlPath variable to the htdocs directory. So instead of

$Foswiki::cfg{PubUrlPath} = '/cgi-bin/wiki/pub';

you enter

$Foswiki::cfg{PubUrlPath} = '/wiki/pub';

If you place the foswiki/pub directory to htdocs/wiki/pub.

Note : I've tried to create a symlink to htdocs/wiki/pub in cgi-bin/wiki/pub, but even with .htaccess Options +FollowSymLinks, I got a Encountered a 500 error with an premature end of script headers error note you may try it opening pub/System/PatternSkinTheme/column_left.css in your browser).

Status of the fix

As of 29 Oct 2012, the issue is partly fixed for now. I am able to send mail manually through little script. I must hack the foswiki code as described in the May 2012 update section below. I will update this page and the homepage spoiler as soon as I fix it.

Some documentation, links and online ressources

link Comments The documentation. A foswiki task with interresting links.

Issue status

When trying confirmation mail, I get a Failed to open file: (Permission denied at /home/project-web/rainbrurpg/htdocs/wiki/lib//Foswiki/UI/ line 426. error. I must test it in my local installation to be able to fix it.

I disabled mail confirmation to let new user register.

May 2012 update

The wiki is spammed every day and it takes me too much time to revert spam pages bulk creation, so I disabled new user registration. I cannot send email from / project web and I created a ticket to get support from the sourceforge team.

Even from a little script, I cannot send email. Here are errors I get :

Trying TLS, I get the /Connect failed :IO::Socket::INET: connect: timeout error/ error :
my $mailer = new Net::SMTP::TLS(
    Hello => 'localhost',
    Port => 25,
    User => 'rainbrurpg',
    Password => 'xxxxxx',             

With SSL SMTP, I get a /IO::Socket::INET configuration failed/ error :
my $mailer = new Net::SMTP::SSL(
    Port => 465,

So, I finally tried with a low-level /IO::Socket::INET/ and I get a /No route to host/ error.

January 2013 update

I finally figured out how to make /SSL/ work. According to this page, using /TLS/ isn't recommended but I got SMTP::SSL working using Foswiki 1.1.5 and prwebmail as hostname (removing ssl://). A complete working example could be :
my $mailer = new Net::SMTP::SSL(
    Port => 465,

-- RainbruUser - 14 Jan 2013
Topic revision: r6 - 06 Feb 2014, RainbruUser


HotScripts.comGet RainbruRPG at Fast, secure and Free Open Source software downloadsThis site is powered by Foswiki
Active Search Results
Viesearch - Life powered search
Copyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Here are my personnal Google+ profile and the related Google+ page.
Ideas, requests, problems regarding RainbruRPG? Send feedback