Terry's picture

Hello,


We have been using the MediaWiki appliance and it's been fantastic for us, but one issue has arrisen that's causing us some grief.

If anyone tries to reset a password, they are presented with the following error:

PEAR mail package is not installed

Backtrace:

#0 /usr/share/mediawiki/includes/User.php(3306): UserMailer::send(Object(MailAddress), Object(MailAddress), 'Account details...', 'Someone (probab...', NULL)
#1 /usr/share/mediawiki/includes/specials/SpecialPasswordReset.php(253): User->sendMail('Account details...', 'Someone (probab...')
#2 [internal function]: SpecialPasswordReset->onSubmit(Array, Object(HTMLForm))
#3 /usr/share/mediawiki/includes/HTMLForm.php(314): call_user_func(Array, Array, Object(HTMLForm))
#4 /usr/share/mediawiki/includes/HTMLForm.php(262): HTMLForm->trySubmit()
#5 /usr/share/mediawiki/includes/HTMLForm.php(277): HTMLForm->tryAuthorizedSubmit()
#6 /usr/share/mediawiki/includes/SpecialPage.php(872): HTMLForm->show()
#7 /usr/share/mediawiki/includes/SpecialPageFactory.php(476): FormSpecialPage->execute(NULL)
#8 /usr/share/mediawiki/includes/Wiki.php(263): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#9 /usr/share/mediawiki/includes/Wiki.php(593): MediaWiki->performRequest()
#10 /usr/share/mediawiki/includes/Wiki.php(503): MediaWiki->main()
#11 /usr/share/mediawiki/index.php(58): MediaWiki->run()
#12 {main}

 

I did find this information:  http://www.mediawiki.org/wiki/Thread:Project:Support_desk/PEAR_mail_pack...

but before I delve in and possibly do more damage to the appliance I wanted to check here first to see if this is a known issue and easy rectified?

Regards,

Terry

Forum: 
Jeremy Davis's picture

AFAIK no one else has reported this so I'm not sure what is going on here...

IMO the TKL appliance should not do this OOTB, although perhaps an update or a module you have installed has changed the requirements beyond default?

I strongly urge you to make sure that you have a current backup (which you have checked restores ok on a fresh server) before proceeding. Love to hear how you go with this though and what the issue is...

Robert Fantini's picture

This worked for us to solve the issue.


​apt-get install php-pear
pear install MAIL Net_SMTP
pear list # verify Net_SMTP OK.

 

I think the errors show up after an edit where someone will get an email.  

 

Jeremy Davis's picture

Sorry to hear that your initial experience hasn't been as smooth and pleasant as all of us would have liked (and hoped). But thank you very much for reporting it. Your post will lead to future users having a better experience...

FWIW, for some reason this issue hasn't been listed on our bug tracker previously hence why it's never been fixed...

I just made the first step to getting it properly fixed by opening a new bug (see here). Now at least it won't slip through the cracks again.

My guess is that it is probably trying to send emails from "root@localhost", "root@mediawiki" or a similar "invalid" email address. Hopefully your full log entry should actually give a little more context on what the actual issue is there.

If you keep in mind that TurnKey Linux is built on top of Debian google should help you out there. Please post back either with more detail (from your log) or with a fix (if you find one). Regardless we'll definitely make sure that this is resolved in the next TurnKey release.

Another thing to keep in mind is that even with that fixed, it is quite possible that the emails still won't be received. AWS IPs are often blacklisted (due to previous user abuse, e.g. sending spam). Possibly the best way to go is to use a 3rd party SMTP relay to send your emails through. We have a doc page on that, see here

Jeremy Davis's picture

We'll have a look at it ASAP and see what he can see. If nothing else we will aim to provide a workaround and fix it in future releases. Regardless using a third party SMTP relay is probably your best option. As I noted above it's documented in our docs. You will still probably need to install the missing dependency (as documented previously in this thread).

Also I'm not sure if you are using the Hub or Amazon MarketPlace; but if you're using AWS MP the AMIs there are really old (v13.1 - our current release is v14.1).

We are hoping to have updated AMIs there very soon but are relying on the AWS MP Seller Ops team to finalise uploading them for us. So far the process has taken months but hopefully they should be up soon (within a few weeks?) but we have no control over that. WRT the Hub we have control complete control so that always has our latest images available. The Hub leverages AWS so not only do you have the simplified interface (only works for servers launched from the Hub); you can still use the Amazon console too if you like.

Jeremy Davis's picture

One of our devs has checked it out and he has confirmed that this is no longer an issue in v14.x. As discussed on the issue thread unless MediaWiki is configured to directly use a remote SMTP relay (which requires the php-pear package) then it falls back on the local sendmail executable (which is provided by postfix). That is as it should be so we won't be adding the php-pear package by default...

So to restate; whilst MediaWiki supports being directly configured to use a remote SMTP (which requires the php-pear package); it is not recommended! It is much better to configure postfix itself (see the docs on how to do that) so that the server as a whole can reliably send emails (not just MediaWiki).

Add new comment