!Friendica Support I have "Email administrators on new user registration" turned on... but I don't get any of these emails, other emails are being sent fine... anyone have any ideas?
Luca Nucifora likes this.
Friendica Support reshared this.
Luca Nucifora likes this.
Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •I have the same behaviour since the feature was introduced.
I am using a self hostet mail server (Postfix, Dovecot).
There is no connection attempt from friendica to the mail server.
Friendica Support reshared this.
Raroun
Unknown parent • • •@Roland Häder
I'm not really that deep into Dovecot.
But in the the file
/etc/dovecot/conf.d/10-mail.conf
there is the entrymail_location = mbox:~/mail:INBOX=/var/mail/%u
This specifies how Dovecot should access an existing directory structure.
In my case the line is
mail_location = maildir:/var/mail/vhosts/%d/%n
which seems to fit your use too.
%d is the domain and %n is the user.
When I install Postfix and Dovecot, I always follow this tutorial:
How to install postfix an dovecot and roundcube
Friendica Support reshared this.
Raroun
Unknown parent • • •I would leave it as it is, actually see no chance to avoid the concat - but I have to admit im lousy at SQL
Friendica Support reshared this.
OldKid ⁂
in reply to Shiri Bailem • • •Friendica Support reshared this.
Hypolite Petovan
in reply to Shiri Bailem • • •Friendica Support reshared this.
Shiri Bailem
in reply to Hypolite Petovan • •@Hypolite Petovan I figured it was more likely a configuration issue on my end, which is why I posted here instead of github.
Are you using PHP mailer or the regular php sendmail/postfix system? I'm curious what might be the differences in configuration and what could be causing this to not go through?
Raroun likes this.
Friendica Support reshared this.
Hypolite Petovan
in reply to Shiri Bailem • • •Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •I checked every log file that exists - for what reason ever, only the "Email administrators on new user registration" mail doesn´t come through.
Ill try to check that tommorrow on my dev-instance.
BTW: i got even step debbugin working wird Friendica and xdebug. Im totally lost in the code but sooner or later i´ll get into it.
Hypolite Petovan likes this.
Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •What a journey, but i got it working
Friendica Support reshared this.
Hypolite Petovan
in reply to Raroun • • •Raroun likes this.
Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •@Hypolite Petovan @Shiri Bailem
I am still completely lost in the code, but was able to identify the problem.
/src/module/register.php
Line 403:
DI::notify()->createFromArray
.will never reached because:
Line 402:
foreach (User::getAdminListForEmailing(['uid', 'language', 'email']) as $admin)
returns an empty array. Of course, if the array is empty, no mail will be sent.
Unfortunately, I don't know why the array is empty, but with the following changes to the
sendNotification
function, the email arrived immediately:Original code:
Modified code (getAdminEmailList instead of getAdminListForEmailing and uid was set manually):
Hypolite Petovan likes this.
Friendica Support reshared this.
Hypolite Petovan
in reply to Raroun • • •@Raroun @Shiri Bailem
User::getAdminListForEmailing
selects database records based on the email addresses included in theconfig.admin_email
configuration value.In addition, these records must have:
parent-uid = 0
(no delegate accounts)blocked = 0
verified = true
account_removed = false
account_expired = false
Did you setup your admin account as a delegate?
Raroun likes this.
Friendica Support reshared this.
Raroun
in reply to Hypolite Petovan • • •@Hypolite Petovan @Shiri Bailem
Nope, no delegate. :(
What’s the difference to
getAdminEmailList
expect it can return unique emails more than one time?Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •@Hypolite Petovan @Shiri Bailem
Got it.
I checked my dev instance and my prod instance. on both instances the parent ID of the admin is NULL but not 0.
a simple
update user set `parent-uid` = '0' where uid ='2';
did the trick. Notification Emails are now arriving without changes to the code.User::getAdminListForEmailing
should be updated to checkparent-uid = 0 OR parent-uid = NULL
Obviously there are instances running where the
parent-id
is NULL.My developer instance was a total fresh install - fresh os, fresh friendica and the
parent-uid
was NULL.Anyway, we have a solution :)
like this
Hypolite Petovan, Shiri Bailem and Luca Nucifora like this.
Friendica Support reshared this.
Hypolite Petovan
in reply to Raroun • • •like this
Raroun and Shiri Bailem like this.
Friendica Support reshared this.
Shiri Bailem
in reply to Hypolite Petovan • •@Hypolite Petovan @Raroun THANKS RAROUN!
This seems weird to me though, because on my instance the only accounts with parent-uid set to anything but NULL are delegates... So maybe there's something to figure out as to why they're not getting set to 0? Or maybe just have the code also look for null?
like this
Raroun and Luca Nucifora like this.
Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •I would check for
parent-uid = 0 OR parent-uid = NULL
in the code.I don‘t know what caused this inconsistency between instances - but it seems for most admins this email notification feature works out of the box.¯\_(ツ)_/¯
rwa likes this.
Friendica Support reshared this.
Shiri Bailem
in reply to Raroun • •Raroun likes this.
Friendica Support reshared this.
rwa
in reply to Raroun • • •I can confirm that it's not working an my instance as well.
Will have a look later if it's the same reason as yours.
Thanks for your investigation
Raroun likes this.
Friendica Support reshared this.
Luca Nucifora
in reply to Raroun • • •@Raroun @Hypolite Petovan @Shiri Bailem
thank you very much @Raroun
Raroun likes this.
Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •Should i create a pull request with a fix for User::getAdminList, or should we leave it as it is?
Friendica Support reshared this.
Shiri Bailem
in reply to Raroun • •Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •@Shiri Bailem
I like that Idea - will create an issue tomorrow "open for Discussion" :)
I´m fine with both options - leave it as it is and tell people the solution when they need it, or applying a fix - like a code based one or a standard value of "0" for that database collumn :)
Shiri Bailem likes this.
Friendica Support reshared this.
Hypolite Petovan
in reply to Raroun • • •@Raroun @Shiri Bailem Pull requests are always welcome, it’s an excellent start of discussion even if it doesn’t get merged or not under its original form.
The user with
uid = 0
is the system user so I’d rather not default theparent-uid
to 0. Ideally we should only check that the value is null, but I’d be curious about theparent-uid = 0
condition intent.Raroun likes this.
Friendica Support reshared this.
Raroun
in reply to Hypolite Petovan • • •I have seen that it´s not that easy like adding an "or".
But it´s possible - give me some time :)
Hypolite Petovan likes this.
Hypolite Petovan
in reply to Shiri Bailem • • •like this
Luca Nucifora, Shiri Bailem and Raroun like this.
Friendica Support reshared this.
Raroun
in reply to Shiri Bailem • • •@Hypolite Petovan
Friendica Support reshared this.
Hypolite Petovan
in reply to Raroun • • •develop
branch and it should fix thoseparent-uid = 0
rows.like this
Raroun and Shiri Bailem like this.
Friendica Support reshared this.