YunoHost-Apps / wikijs_ynh

Modern and powerful wiki app package for YunoHost
https://wiki.js.org/
GNU Affero General Public License v3.0
18 stars 4 forks source link

Did not received e-mail for LDAP #107

Closed Zykino closed 4 years ago

Zykino commented 4 years ago

In the readme it is said that root will receive an e-mail at the end of the installation or the upgrade with the info on how to configure LDAP. I did not received it.

Can you give me the instruction or are they specific/generated at install?

yalh76 commented 4 years ago

Have you checked the logs of installation ? Or can you provide them ?

Instructions are specifics, you can find them at: https://github.com/YunoHost-Apps/wikijs_ynh/blob/master/conf/ldap_message

Zykino commented 4 years ago

Thank, I believe I have all information I need in the logs… but hard to extract (will do the sed by hand).

I think the problem is that the root e-mail is not well extracted so when sending the e-mail it is not right:

2020-04-28 19:42:27,315: DEBUG - + /usr/bin/mail.mailutils -a 'Content-Type: text/plain; charset=UTF-8' -s '☁️🆈🅽🅷☁️: `wikijs` has just been installed!' '  root'

I think the important part is here (looked for "root" in the logfile):

2020-04-28 19:42:21,812: DEBUG - + ynh_handle_getopts_args --match_string=__PATH_URL__ --replace_string=/ --target_file=../conf/ldap_message
2020-04-28 19:42:21,813: DEBUG - + set +x
2020-04-28 19:42:21,813: DEBUG - + local delimit=@
2020-04-28 19:42:21,813: DEBUG - + match_string=__PATH_URL__
2020-04-28 19:42:21,814: DEBUG - + replace_string=/
2020-04-28 19:42:21,814: DEBUG - + sed --in-place s@__PATH_URL__@/@g ../conf/ldap_message
2020-04-28 19:42:21,814: DEBUG - + ynh_send_readme_to_admin --app_message=../conf/ldap_message --recipients=root --type=install
2020-04-28 19:42:21,815: DEBUG - + args_array=([m]=app_message= [r]=recipients= [t]=type=)
2020-04-28 19:42:21,815: DEBUG - + declare -Ar args_array
2020-04-28 19:42:21,816: DEBUG - + local app_message
2020-04-28 19:42:21,816: DEBUG - + local recipients
2020-04-28 19:42:21,816: DEBUG - + local type
2020-04-28 19:42:21,817: DEBUG - + ynh_handle_getopts_args --app_message=../conf/ldap_message --recipients=root --type=install
2020-04-28 19:42:21,817: DEBUG - + set +x
2020-04-28 19:42:21,918: DEBUG - + app_message=../conf/ldap_message
2020-04-28 19:42:21,918: DEBUG - + recipients=root
2020-04-28 19:42:21,919: DEBUG - + type=install
2020-04-28 19:42:21,919: DEBUG - ++ ynh_app_setting_get wikijs admin_mail_html
2020-04-28 19:42:21,919: DEBUG - ++ local legacy_args=ak
2020-04-28 19:42:21,920: DEBUG - ++ args_array=([a]=app= [k]=key=)
2020-04-28 19:42:21,920: DEBUG - ++ declare -Ar args_array
2020-04-28 19:42:21,920: DEBUG - ++ local app
2020-04-28 19:42:21,921: DEBUG - ++ local key
2020-04-28 19:42:21,921: DEBUG - ++ ynh_handle_getopts_args wikijs admin_mail_html
2020-04-28 19:42:21,922: DEBUG - ++ set +x
2020-04-28 19:42:21,922: DEBUG - ++ echo '! Helper used in legacy mode !'
2020-04-28 19:42:21,922: DEBUG - ++ set +x
2020-04-28 19:42:21,923: DEBUG - ++ ynh_app_setting get wikijs admin_mail_html
2020-04-28 19:42:21,923: DEBUG - ++ [[ get == \d\e\l\e\t\e ]]
2020-04-28 19:42:21,923: DEBUG - ++ ACTION=get
2020-04-28 19:42:21,924: DEBUG - ++ APP=wikijs
2020-04-28 19:42:21,924: DEBUG - ++ KEY=admin_mail_html
2020-04-28 19:42:21,924: DEBUG - ++ VALUE=
2020-04-28 19:42:21,925: DEBUG - ++ python2.7 -
2020-04-28 19:42:22,126: DEBUG - ++ [[ admin_mail_html =~ ^(unprotected|skipped)_ ]]
2020-04-28 19:42:22,126: DEBUG - + admin_mail_html=
2020-04-28 19:42:22,127: DEBUG - + admin_mail_html=0
2020-04-28 19:42:22,127: DEBUG - ++ find_mails root
2020-04-28 19:42:22,127: DEBUG - ++ local list_mails=root
2020-04-28 19:42:22,128: DEBUG - ++ local mail
2020-04-28 19:42:22,128: DEBUG - ++ local 'recipients= '
2020-04-28 19:42:22,129: DEBUG - ++ for mail in $list_mails
2020-04-28 19:42:22,129: DEBUG - ++ '[' root = root ']'
2020-04-28 19:42:22,129: DEBUG - ++ recipients='  root'
2020-04-28 19:42:22,130: DEBUG - ++ echo '  root'
2020-04-28 19:42:22,130: DEBUG - + recipients='  root'
2020-04-28 19:42:22,130: DEBUG - + local 'mail_subject=☁️🆈🅽🅷☁️: `wikijs`'
2020-04-28 19:42:22,131: DEBUG - + '[' install = backup ']'
2020-04-28 19:42:22,131: DEBUG - + '[' install = change_url ']'
2020-04-28 19:42:22,131: DEBUG - + '[' install = remove ']'
2020-04-28 19:42:22,132: DEBUG - + '[' install = restore ']'
2020-04-28 19:42:22,132: DEBUG - + '[' install = upgrade ']'
2020-04-28 19:42:22,132: DEBUG - + mail_subject='☁️🆈🅽🅷☁️: `wikijs` has just been installed!'
2020-04-28 19:42:22,133: DEBUG - ++ '[' -n ../conf/ldap_message ']'
2020-04-28 19:42:22,133: DEBUG - ++ cat ../conf/ldap_message
2020-04-28 19:42:22,134: DEBUG - ++ yunohost tools diagnosis
2020-04-28 19:42:22,134: DEBUG - ++ grep -B 100 services:
2020-04-28 19:42:22,134: DEBUG - ++ sed /services:/d
2020-04-28 19:42:27,252: DEBUG - + local 'mail_message=This is an automated message from your beloved YunoHost server.
2020-04-28 19:42:27,252: DEBUG - 
yalh76 commented 4 years ago

well.. the root email is not extracted... it's just put in root mailbox

Zykino commented 4 years ago

Yeah. I found all of the info in the full log… except the password (which is replaced by ***).

If you want me to try any patch let me know. (I don’t know how to install other than from the list on the web interface.)

yalh76 commented 4 years ago

You can retrieve ldap password doing yunohost app setting wikijs ldap_password

Zykino commented 4 years ago

Thank you for your help !

I got another problem but not sure if I should report it on this repo or on wiki.js one: A user can login but not the first yunohost user (the one with multiples mail address associated: root, webmaster, admin, … First user is getting Missing or invalid email address from profile. when trying to login.

yalh76 commented 4 years ago

Yes, it's an already known issue. The root user can't login with his email address. I don't know if the issue is more at the YunoHost level or at wikijs level....