Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: bloodshoteye on June 09, 2010, 10:00:45 PM

Title: Mediawiki not sending e-mail
Post by: bloodshoteye on June 09, 2010, 10:00:45 PM
Hi,

I may be inviting a rebuke with this question, but I'll take my chances.
I'm hoping someone else has tried the following combo and had success either right away or possibly sorted out a similar issue - I know this is not a standard setup.

On an up-to-date 7.5 installation I added mediawiki-1.15.4 into /opt using Site Maker.

I have the PHP5-cgi 5.2.8 contrib, with the correct statement in the Apache custom-template. The site works as advertised - except it won't send mail.
Googling suggests this may be the case if "date.timezone" is missing from the .ini file, so I added it via a php5.ini custom-template. A phpinfo() file in the root of the site now correctly shows enabled local and master timezones for php5.
The error says, inter alia, "could not send your confirmation mail. Please check your e-mail address for invalid characters" Checked this and tried several users - addresses and syntax are correct.

The Mediawiki site is no help in this particular case and I find nothing pertinant on SMEs forums.
I didn't think this to be a legitimate question for Bugzilla, either.
I've searched through logs, but so far found nothing. If anyone has tried this I would appreciate any feedback

Cheers,
Title: Re: Mediawiki not sending e-mail
Post by: Stefano on June 09, 2010, 10:25:51 PM
how should mediawiki send emails?
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 09, 2010, 10:34:53 PM
how should mediawiki send emails?

For e.g. the 1st user (the admin) needs to confirm his e-mail address, also any other user who creates an account because I have set
Code: [Select]
$wgEmailAuthentication = true; in mediawiki. I only want authenticated users to be able to edit (as far as I understand it).

EDIT 10:44pm SAST: The user can confirm his e-mail address from within mediawiki via his Preferences page. Until this is done he can't receive mail from the site, for instance notification on pages he's watching.
Title: Re: Mediawiki not sending e-mail
Post by: Stefano on June 09, 2010, 10:37:35 PM
no, sorry.. I want to know how php should send email.. what server are you using? how did you setup email function?
Title: Re: Mediawiki not sending e-mail
Post by: cactus on June 09, 2010, 10:42:49 PM
The Mediawiki site is no help in this particular case and I find nothing pertinant on SMEs forums.
Hmmm, you sure you checked this page: http://www.mediawiki.org/wiki/Manual:Configuration_settings ? It has  a section on the E-mail settings.
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 09, 2010, 11:02:42 PM
no, sorry.. I want to know how php should send email.. what server are you using? how did you setup email function?
Stefano I'm using a standard SME 7.5 server. We have other php scripts in /opt that send mail, admittedly they use php4. Meadiawiki has a built in Mailer.

Hmmm, you sure you checked this page: http://www.mediawiki.org/wiki/Manual:Configuration_settings ? It has  a section on the E-mail settings.
Yes cactus and I have enabled several of them. I've inspected the rest and none appear to be related.
Title: Re: Mediawiki not sending e-mail
Post by: piran on June 10, 2010, 12:16:08 AM
The error says, inter alia, "could not send your confirmation mail.
Please check your e-mail address for invalid characters"
Checked this and tried several users - addresses and syntax are correct.
I haven't tried any of what you've attempted.
Despite that here's a suggestion that you might consider.
I'd assume the error is correct and that the addresses/syntax are not...
particularly the bit where it cites "invalid characters".
Think hanging/leading spaces, UTF UTF8 UTF16 ANSI,
\n or <br>  " " or ' ' and open out the logging level
of the qpsmtpd and qmail logs as you could probably
nail it straight away from what's recorded in there.
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 10, 2010, 04:22:48 PM
I'd assume the error is correct and that the addresses/syntax are not...
I really have checked these - all ok.
Quote
particularly the bit where it cites "invalid characters".
Think hanging/leading spaces, UTF UTF8 UTF16 ANSI,
Nothing invalid and I haven't fiddled with encoding
Quote
open out the logging level of the qpsmtpd and qmail logs as you could probably
nail it straight away from what's recorded in there.
I changed the level to 10 - nothing of interest that I can see. It's as if nothing leaves Mediawiki's Mailer.

I gave up and tried to install the mediawiki contrib from here:http://wiki.contribs.org/Mediawiki (http://wiki.contribs.org/Mediawiki)
Sigh! - I even have errors with this. Yum says it's installed, but there's no directory in /opt. If I try to uninstall it says "not installed" Maybe this is a clue - part way through install, at the point where the script tries to back-up an existing MW installation:
Code: [Select]
...
Updating MediaWiki... Please wait!
Backing up installation files...
tar: mediawiki: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
Backing up MySQL database...
error: %pre(smeserver-mediawiki-1.6.10-8.noarch) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping smeserver-mediawiki-1.6.10-8
Migrating existing database accounts
Migrating existing database blacklist
and so on
...
Title: Re: Mediawiki not sending e-mail
Post by: piran on June 10, 2010, 04:32:56 PM
signal event post-upgrade and signal-event reboot?
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 10, 2010, 04:46:13 PM
signal event post-upgrade and signal-event reboot?
From the contrib:
Quote
You can ignore the yum-comments signal event post-upgrade and signal-event reboot.
but I did anyway. No directory in /opt

Title: Re: Mediawiki not sending e-mail
Post by: piran on June 10, 2010, 04:50:54 PM
...after the install (not after the uninstall).
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 10, 2010, 08:16:47 PM
...after the install (not after the uninstall).
Yes I did that. I can't uninstall as yum reports "not installed" even though yum says the package is successfully installed after running
Code: [Select]
yum localinstall smeserver-mediawiki-1.6.10-8.noarch.rpmDo you know how to unconfuse yum? (yum clean all has made no change to the situation).
Title: Re: Mediawiki not sending e-mail
Post by: piran on June 10, 2010, 08:23:51 PM
I am not inclined to advocate a 'force' switch...
In my book I drop anything that isn't written competently
enough to install itself on the reasonable grounds that the
rest of it is likely to be equally shoddy and troublesome.
Appears there is likely to be an installer quirk,
you might consider re-installing 'over the top'
so to speak.
Title: Re: Mediawiki not sending e-mail
Post by: cactus on June 10, 2010, 08:28:05 PM
Code: [Select]
...
Updating MediaWiki... Please wait!
Backing up installation files...
tar: mediawiki: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
Backing up MySQL database...
error: %pre(smeserver-mediawiki-1.6.10-8.noarch) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping smeserver-mediawiki-1.6.10-8
Migrating existing database accounts
Migrating existing database blacklist
and so on
...
This should mean that the RPM is not installed. IIRC a failed %pre macro would halt install and prevent the package from installing files on your system.

Yes I did that. I can't uninstall as yum reports "not installed" even though yum says the package is successfully installed after

So concluding that smeserver-mediawiki is not installed should be correct, but reporting success on install should be wrong IMHO. That you can not find your mediawiki files is correct a this RPM is doing stuff in a very non standard way. It installs the mediawiki source in the %pre macro, since that fails it will be not installed on your system.
Title: Re: Mediawiki not sending e-mail
Post by: cactus on June 10, 2010, 08:33:58 PM
It installs the mediawiki source in the %pre macro, since that fails it will be not installed on your system.
I have raised a bug (http://bugs.contribs.org/show_bug.cgi?id=6046) against smeserver-mediawiki for this strange install method and encouraged the owner to fix other outstanding bugs (http://bugs.contribs.org/buglist.cgi?type0-0-4=substring&type0-0-1=substring&classification=Contribs&value0-0-2=mediawiki&query_format=advanced&type0-0-3=substring&value0-0-3=mediawiki&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&value0-0-4=mediawiki&value0-0-1=mediawiki&type0-0-0=substring&value0-0-0=mediawiki&component=smeserver-mediawiki&product=SME%20Contribs&type0-0-2=substring) as well.
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 10, 2010, 08:52:35 PM
I have raised a bug (http://bugs.contribs.org/show_bug.cgi?id=6046) against smeserver-mediawiki for this strange install method and encouraged the owner to fix other outstanding bugs (http://bugs.contribs.org/buglist.cgi?type0-0-4=substring&type0-0-1=substring&classification=Contribs&value0-0-2=mediawiki&query_format=advanced&type0-0-3=substring&value0-0-3=mediawiki&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&value0-0-4=mediawiki&value0-0-1=mediawiki&type0-0-0=substring&value0-0-0=mediawiki&component=smeserver-mediawiki&product=SME%20Contribs&type0-0-2=substring) as well.
Thanks for that cactus.

I'm going to look at alternative wikis for the time being. I wonder - if others are following this thread, which of the many wikis available install into /opt and are SME friendly?
Title: Re: Mediawiki not sending e-mail
Post by: cactus on June 10, 2010, 09:25:50 PM
I'm going to look at alternative wikis for the time being. I wonder - if others are following this thread, which of the many wikis available install into /opt and are SME friendly?
Why are you so keen on installing in /opt?
Title: Re: Mediawiki not sending e-mail
Post by: bloodshoteye on June 10, 2010, 11:19:41 PM
Why are you so keen on installing in /opt?
Some time ago I read many a forum post discussing the pros and cons of web apps in ibays vs opt and opt was always said to be the better option - more secure. Also local LAN users can't get at/read/copy files via Samba shares?
Title: Re: Mediawiki not sending e-mail - SOLVED???
Post by: bloodshoteye on June 12, 2010, 05:38:04 PM
I think I found the solution, which I provide here for others:

Recall I said I'm using PHP5-cgi. After some more Googling I made the following addition in /etc/e-smith/templates-custom/etc/php5/php.ini/80ModuleSettings02mailfunction
Code: [Select]
[mail function]
SMTP =  localhost
sendmail_from = me@localhost
sendmail_path = usr/sbin/sendmail -t -i
The sendmail_path line is what I added.
Of course one must also do
Code: [Select]
# expand-template /etc/php5/php.ini
# service httpd-e-smith restart

Built-in PHP mailer function tested working in TikiWiki (in /opt/wiki) Not tested with Mediawiki in /opt as I gave up on that awhile ago, but likely will also succeed.