Item1478: Reset Password changes password but doesn't send email with new password
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
When I fill in the Reset Password form with the Wiki name on our wiki, the password gets changed, but the email to the
WikiUser containing the new password will not be sent.
I use foswiki 1.0.4 upgraded from version 1.0.0
I think this is a bug. I do not have a clue how to fix it.
When I register a new wiki user, the user receives a mail. So sending automated mails from the home page is possible.
Please help
--
AndreMueller
I tested this as late as yesterday. Many times.
And it works also in my production sites.
We need some information from you.
Which password manager do you use? Are the email addresses in .htpasswd?
And if not - are the email addresses in the Main web user topics?
Are you using some
LdapContrib?
For the password reset feature to work you need a password manager to do it and the emails must be available to it.
In a standard Foswiki 1.0.4 it works.
--
KennethLavrsen - 20 Apr 2009
my settings
LocalSite.cfg
{MailProgram} /usr/sbin/sendmail -t -oi -oeq
{LoginManager} Foswiki::LoginManager::TemplateLogin
{UserMappingManager} Foswiki::Users::TopicUserMapping
{PasswordManager} Foswiki::Users::HtPasswdUser
I am not using LDAP.*
LocalSite.cfg gives me no hit when searching for ldap
{Htpasswd}{FileName} location +filename is correct this file contains usernames
ther encrypted passwords and the valid corresponding email addresses
(for example:UserName:v6JYgccRGm8jnI:users@email.com)
It is in this file I was able to see that the reset password actually changed the password. But corresponding user doesn't receive any email.
--
AndreMueller
Any errors in the Apache log or other system logs on the computer?
I am sure it is a config problem because the rest of us have this working.
what are your values for these settings?
- $Foswiki::cfg{EnableEmail}
- $Foswiki::cfg{WebMasterEmail}
- $Foswiki::cfg{WebMasterName}
- $Foswiki::cfg{SMTP}{MAILHOST}
- $Foswiki::cfg{SMTP}{SENDERHOST}
- $Foswiki::cfg{SMTP}{Username}
- $Foswiki::cfg{SMTP}{Password}
I do not need the real values. I need to know if you have them defined and the syntax of the value but it is OK to replace the real data with some dummy values to protect your secrets from public view.
Put my wikiname in the
WaitingFor field when you answer. Then I get emails that tell me you answered
--
KennethLavrsen - 25 Apr 2009
When performing the reset password there is no error or such in the Apache log files
Regarding the System log files: I have no reading rights to the maillog in /var/log
These are my settings:
$Foswiki::cfg{EnableEmail} = 1;
$Foswiki::cfg{WebMasterEmail} = 'myMailAddress@mail.com';
$Foswiki::cfg{WebMasterName} = 'Wiki Administrator';
$Foswiki::cfg{SMTP}{MAILHOST} = '';
$Foswiki::cfg{SMTP}{SENDERHOST} = '';
$Foswiki::cfg{SMTP}{Username} = '';
$Foswiki::cfg{SMTP}{Password} = '';
$Foswiki::cfg{MailProgram} = '/usr/sbin/sendmail -t -oi -oeq';
Net::SMTP
2.31 installed
Desc: may be required for sending mail
Previously I said that "When I register a new wiki user, the user receives a mail." That is not the case any more. I receive no emails at all anymore from my foswiki site.
It might be related to upgrade from version 1.0.0 to 1.0.4
I am not defining any SMTPMAILHOST on a Preference site: see grep result
[anb@sdf foswikimain]$ grep -r "SMTPMAILHOST" *
data/System/SiteTools.txt:Foswiki will use the
Net::SMTP
module if it is installed on your system. Set this with the
SMTPMAILHOST
preference setting.
data/System/SiteTools.txt:! *
Net::SMTP can be easily disabled (if there is an installation error) by setting the
SMTPMAILHOST
preference setting to an empty value.
data/System/DefaultPreferencesForm.txt:| FINALPREFERENCES | textarea | 60x5 | ATTACHFILESIZELIMIT, PREVIEWBGIMAGE, WIKITOOLNAME, WIKIWEBMASTER, SMTPMAILHOST, SMTPSENDERHOST, ALLOWWEBMANAGE, READTOPICPREFS, TOPICOVERRIDESUSER | Multiple select | S |
data/System/DefaultPreferencesForm.txt,v:| FINALPREFERENCES | textarea | 60x5 | ATTACHFILESIZELIMIT, PREVIEWBGIMAGE, WIKITOOLNAME, WIKIWEBMASTER, SMTPMAILHOST, SMTPSENDERHOST, ALLOWWEBMANAGE, READTOPICPREFS, TOPICOVERRIDESUSER | Multiple select | S |
lib/Foswiki/Net.pm: $this->{MAIL_HOST} = $prefs->getPreferencesValue('SMTPMAILHOST');
lib/Foswiki.spec:# below and all SMTPMAILHOST settings in your Foswiki's Preferences topics.
lib/Foswiki.spec:#
CAUTION This setting can be overridden by a setting of SMTPMAILHOST
Finally setting {SMTP}{MAILHOST} to mail.myDomain.ab seems to solve the problem. I now get the reset password mails from my Foswiki %BR%
Thanks for your help.
It seems to me that the upgrade to version 1.0.4 didn't worked out smoothly, but I might be wrong.
--
AndreMueller
OK.
Good you got it to work.
you had
$Foswiki::cfg{SMTP}{MAILHOST} = '';
$Foswiki::cfg{SMTP}{SENDERHOST} = '';
You probably had it defined in a preference topic which got overwritten but this is really the sort of setting to define in configure.
Your problem was obviously that you had not defined some essential mail settings in configure
So no action required
--
KennethLavrsen - 30 Apr 2009