spring / uberserver

uberserver, a matchmaking/chat lobby server for the spring rts project
https://springrts.com/wiki/Uberserver
Other
33 stars 38 forks source link

help with implimenting email verification #374

Closed rosscosack closed 4 years ago

rosscosack commented 4 years ago

Hi I am implementing the email notification system for the byar server. I have created a file in the root of the uberserver directory called server_email_account.txt. In this file I have a single line no-reply@road-flag.bnr.la. I have set up postfix and can send email via the mail command eg echo "Test mail" | mail -s "Thanks for your help" email@address.com I can see the message successfully sent in both the recipient email inbox and the /var/log/mail.log When I create a dummy user with a valid email address the uberserver log reports

2020-05-12 20:32:15 INFO  Protocol.in_REGISTER:893  [725] Successfully registered user <rossco123>.
2020-05-12 20:32:15 INFO  Protocol.in_LOGIN:1001  [725] Sent user <rossco123> the terms of service on session.

And yet I receive no email.

Bluestone suggested I request for some hardcoded values be un-hardcoded.

I can see in SQLUsers.py there are some hardcoded values. I attempted to set root.mail_user to no-reply@road-flag.bnr.la but but still no luck.

The mail log shows no attempted/failed emails relating to the verification email

silentwings commented 4 years ago

edit: Currently failing to reproduce / test this because when I enter road-flag.bnr.la into my SpringLobby it appears to silently redirect me to springrts.com

rosscosack commented 4 years ago

you are correct, it works now and I don't know what changed. Thanks! So I should manually update the sql users file removing the sprintrts.com references?

here is the agreement in server_agreement.txt

[root@road-flag uberserver]# cat server_agreement.txt
You agree not to use any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-oriented or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned; and relevant legal authorities being informed of your actions and of data which personally identifies you.
rosscosack commented 4 years ago

Please provide location of terms of service

silentwings commented 4 years ago

Oh, perhaps it wasn't redirecting me afterall then... terms of service = server_agreement.txt, thanks for fixing them ... or perhaps it is still silently redirecting me ....

So I should manually update the sql users file removing the springrts.com references?

Not sure what you mean by this, I think the userdb doesn't include any mentions of springrts (and whether you delete users who agreed to an invalid/old ToS is ofc up to you).

rosscosack commented 4 years ago

I am referring to the springrts.com references in SQLUsers.py. I would like to confirm that this is the preferred way updating the verification email body and subject etc

silentwings commented 4 years ago

Oic - support for external servers isn't offered (since uberserver is already tied to parts of springrts.com, and will only become tied closer in future + GDPR reasons basically prevent linking userdbs) so yes you'll have to edit the code. I'll centralize the identity used in emails to reduce the amount of changes you'll need, for now, but realistically the level of divergence will grow with time.

silentwings commented 4 years ago

https://github.com/spring/uberserver/commit/3cb084b6761c11dfa19e4cdbc2604c2a0b659f50