Built-in STMP server #122
Labels
No labels
bug
duplicate
enhancement
help wanted
in progress...
information
invalid
not enough info
priority high
priority low
priority normal
question
request
research
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Techwizz/pvpgn-server#122
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Log pvpgn:
Nov 20 16:43:06 [info ] pvpgn::bnetd::_client_loginreq2: [300] "RULERS-TEAM02" logged in (no password)
Nov 20 16:43:12 [info ] pvpgn::bnetd::_client_setemailreply: [300] init account "Rulers-Team02" email to ""
Nov 20 16:43:12 [info ] pvpgn::bnetd::_client_realmjoinreq109: [300] realm join for "RULERS-TEAM02" failed (no password)
account have password, fix: change pass /chpass "acc" "new pass"
How did the account initially not have a password?
la cuenta tenia contraseña pero por algun motivo se les bugea la contraseña y el e-mail
had the account password but for some reason they bugea password and e-mail
@HarpyWar I think we need to add sending email capability to PvPGN.
@xboi209 Yes, it can be implemented if use good C++ SMTP library. It will be nice enhancement.
@slipknotivo How can I reproduce the bug? Can you send me your server's database to do it?
I'd advise against implementing SMTP server inside PvPGN. Why not simply make it connect to a real SMTP server, authenticate and send email from there? This way you just connect to any email server using telnet or openssl and it only needs a socket. You could even do it via gmail this way.
Adding a full blown SMTP server will inevitably be half-assed implementation. Just think of Postfix/exim and how hard those programs are to set up properly.
So I believe what you actually want is an SMTP client, not server.
Sure, it will be better to implement only interface to make it connect to a real SMTP server.
Another issue is that standart activation links in email can not be used here because it needs a web server. I suggest below solution to prevent spam registrations via email.
First mail can be send with a temporary random generated password to a user after registration. If user don't provide an email after login then it will be kicked from a server until email will not be entered. After a first login account will be locked and banned. It will need two more fields in a database to save initial password and flag that it is not activated account.
Then user checks his mail and enter temporary password into login screen (if user not activated temporary password validation should be checked before locked flag). After first login password automatically changes to initial that user was entered on registration.
Users can make a mistake in an email. If account didn't activated during X time after registration (e.g. one hour) then it can be re-registered.
I think it could be made less complicated. You can send like a 4 digit code via email and then user enters it somewhere after first login. There are a few ways:
This way you only need one email and use can pick his own password from start which is preferred.
There is no dialog box feature, even if create it with ExtraWork not all games support this.
The second solution looks the best!
I'll start messing around with this, first thing to do is check out the existing SMTP client libraries and pick a good one. I'll post my findings here.
It seems that libcurl is the most obvious choice. There are some more libraries but they have much less examples on the internet and libcurl is definitely the most known and supported out there.
I'll create a sample code for smtp and smtps for my own mail server and gmail as examples in few days.
cmake -G "Visual Studio 12" -B./build -H./ -DOPENSSL_ROOT_DIR=C:/git/openssl/ build -DOPENSSL_LIBRARIES=C:/git/openssl/build/lib -DOPENSSL_INCLUDE_DIR=C:/git/openssl/build/include -DBUILD_CURL_TESTS=OFF -DCURL_STATICLIB=ON
OpenSSL paths need to be provided, tests disabled because of some cmake error and I decided to use static in this caseSince we are introducing two new dependencies I need some guidance how to deal with this. At the moment we only depend on zlib and it has to be externally provided or it's provided by magic builder. Linux is not a problem because you just install the dependencies but on windows we need to provide headers and binaries somehow. Magicbuilder can provide them obviously but I'd suggest we solve this permanently. Do you think we could add include files and binaries for windows build to the project? Same for zlib. This makes us responsible for updating the libraries but magic builder has the same problem anyway.