Play by email issues

Web version of freeciv at play.freeciv.org
Rmatt
Posts: 8
Joined: Thu Jan 18, 2018 5:45 pm

Play by email issues

Postby Rmatt » Tue Apr 09, 2019 2:33 pm

Hi folks,

First of all, thanks for all the efforts to get back Freecivweb working! It's great! :-)

I am playing with some colleagues and we already experienced some issues with the mail services in the past week. Once the domain of the link "sendibt2.com" was not responding for several hours and currently, although it is my turn to play, I haven't received the email since I should play (couple of hours already).

Currently I'm not able to enter Turn 4, although the server know it's my turn. But funnily, if I use the link of round 2 or 3, I could enter there and go again to this round... Which I guess is also a bug rather than a feature. It would be great if any old link, or any permanent link from the website could allow each player to login for the current round, without requesting that precise/particular link.

All the best,
Matthieu

Rmatt
Posts: 8
Joined: Thu Jan 18, 2018 5:45 pm

Re: Play by email issues

Postby Rmatt » Tue Apr 09, 2019 3:12 pm

One possibility would be to extend the /mailstatus server to eventually include the "pbem_processed", so that this can be translated to a link on the status website...
Meaning here https://github.com/freeciv/freeciv-web/ ... lstatus.py
and here https://github.com/freeciv/freeciv-web/ ... e/list.jsp

I'm not sure in how far this is sensible data that could be used by other players...

Rmatt
Posts: 8
Joined: Thu Jan 18, 2018 5:45 pm

Re: Play by email issues

Postby Rmatt » Tue Apr 09, 2019 3:42 pm

For the other problem, I think also that the file https://github.com/freeciv/freeciv-web/ ... pt/pbem.js could be changed to

1. Check if it is really the turn of the user logging in to play (and not simply via SimpleStorage, it's easy enough to use another browser)
2. Return the latest savegame and not offer the possibility to restart another turn

But I'm not sure, maybe the data collected in https://github.com/freeciv/freeciv-web/ ... em/pbem.py in loaded_games or pbem-games.json should not be known or accessible by other parts of the infrastructure...

I am willing to help on the software-side, but I know too little of the system itself to be able to make good decisions

User avatar
AndreasR
Elite
Posts: 698
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Play by email issues

Postby AndreasR » Tue Apr 09, 2019 5:09 pm

I got this error mail from SendInBlue:

"Hello,

Your hourly quota for your SendinBlue SMTP account has been reached. Your new messages will be saved in the backlog. Saved messages will be retried again during your next hour quota.

If you want to increase your SMTP hourly quota, you can choose to send your emails via a dedicated IP. It allows you to digitally sign your emails with your own subdomain and fully manage your reputation. By choosing the dedicated IP, you'll have no limit of items per hour. For more information on configuring the dedicated IP, please click here. The last step is to link your dedicated IP to your SMTP account.

Kind regards,
The SendinBlue Team"

User avatar
AndreasR
Elite
Posts: 698
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Play by email issues

Postby AndreasR » Tue Apr 09, 2019 5:10 pm

In other words, please donate:

https://www.patreon.com/freecivweb

Rmatt
Posts: 8
Joined: Thu Jan 18, 2018 5:45 pm

Re: Play by email issues

Postby Rmatt » Wed Apr 10, 2019 5:11 pm

Hi Andreas,
I am fine with contributing/donating however this won't fix the problems:

As we can see here, https://www.sendinblue.com/pricing/ the limit is 300 emails per day, which I doubt are reached. Also in opposition to the mail you received, the mails don't get delay, they just disappear, I still have received nothing...
In case they try to force us to pay, the next step is 20$/month, which I think can be better invested somewhere else AND to get an IP (as suggested in the mail) it is more than 50$/month

So one option would be to switch the mail provider, choosing between MailChimp, MailJet and MailGun which all offer pretty similar free tiers. It's more about getting one that would let us leave in peace than optimizing the choice based on features...

The other one is to change the code in order to be able to access the game from a website, not strictly requiring the game to play! (For example, as the /mailstatus endpoint is open for all, it would be very easy to write a plugin/an integration for Slack (or whatever else) that would check for the next turn and post it otherwise than per mail. This needs the link that for now is only available per mail... This was the sense of my help suggestions before, if anyone has more insights on the code and the implication of exposing the pbem/savegame

Rmatt
Posts: 8
Joined: Thu Jan 18, 2018 5:45 pm

Re: Play by email issues

Postby Rmatt » Fri Apr 12, 2019 1:10 pm

Yet another option for the mail server would be to have a lambda function sending mails via AWS SES.
https://github.com/tryolabs/lambda-mailer
https://aws.amazon.com/ses/pricing/?nc1=h_ls
10 cents per 1000 mails. And I'm not sure if we even get the 60k free if sent from EC2 when they are sent via Lambda Functions. In any case a much more affordable paying option than the one from SendInBlue