Cross-server mail plugin

Discussion in 'Archived: Plugin Requests' started by russellsayhi, May 26, 2012.

  1. Offline

    russellsayhi

    Plugin category: Chat

    Suggested name: SSM (Server-to-server-mail)

    A bit about me: I have been playing Minecraft since 1.7 and I love CraftBukkit. I run a survival server and a creative server, and am an administrator on an awesome PvP server. I am going to take a java course in about 6 months, but at the moment I cannot code for my life.

    What I want: Well, I would really like to see a cross server mail plugin. I have been searching the past few weeks, to no avail, to find any plugin of the sort. The closest I have found is a plugin that links chat between multiple servers, but you have to specifically link the servers. You don't have your mail on any server you go on with that. All I want is a simple "/mail" and maybe cross server "/msg". Anyway, I think that if enough people got this plugin, it could be the standard of mail on Minecraft and if you went on almost any server, you could receive, clear, and send mail.

    Ideas for commands: /mail, and maybe /msg or /tell. (If someone /msg'd you while you were offline, it would come in the form of mail when you went offline.

    Ideas for permissions: ssm.mail (/mail), ssm.check (check your mail), ssm.delete (delete/clear mail), ssm.send (send mail)

    When I'd like it by: Well, anytime, although I'd prefer it before the end of summer. I don't want to rush anyone, and if this is taken up by you I will give you my utmost appreciation!

    Similar plugin requests: None.

    Devs who might be interested in this: I don't really know, I am new to these forums. Well, hopefully, whoever is reading this post is interested :).
     
  2. Offline

    np98765

    Sorry, I'm not a plugin developer (at all), but I'm still curious...

    You want a GLOBAL mail system? So, any server with "SSM" installed can have their users send mail to any other users on other servers?

    So you're basically asking for an in-game, global email system, if I understand correctly?
     
  3. Offline

    russellsayhi

    Yes.
    Since I am not good (at all) with code, I have a question. Your tone of voice seems to point to that it would be difficult, which I was unaware of. Sorry about that, and I also thought of something. Would it be possible, so the dev wouldn’t have to run his own server that the mail would go through, to have the SSM server run on the servers that the SSM plugin has been installed on? I.e. I install SSM on my server, and although the dev didn’t set up a mail server, a server now exists for SSM. So basically, a mail server is PART of SSM, so as long as someone has the plugin, a server for SSM exists. Would that be possible?
     
  4. Offline

    np98765

    Don't listen to my tone of voice... I'm not a plugin developer :p I was just wondering, since it seems quite... Difficult to make, not to mention an extremely different plugin. It's a good idea, but I'm not sure how it could connect all servers together.

    In your previous post, you talked about if a server owner installs it, it will set up a mail server on there. That mail server could only be local, unless you opened some ports and did some other fancy-schmancy stuff. You would need one person/company to host the mailserver for you, I believe. I don't think there's a way for everyone to access it without that.
     
  5. Offline

    russellsayhi

    Aww. Well I could host that server, maybe. If any devs were interested in the plugin.
     
  6. Offline

    np98765

    Hmm... Personally, I don't think it will work, technically-wise. Don't get me wrong, I like the idea, but in terms of stability, it would be hard. Getting a server owner to consent to use a plugin that hooks up to your computer? They're basically dependent on whether your computer, internet, ports, etc. are stable and working.

    You would need a large central server to host all of the mail on. If this plugin were to grow, your computer would not be able to hold all of the information.

    I like the idea, but from a larger view, I think it would be very hard to pull off.
     
  7. Offline

    Superkabii

    I've been thinking about the system this would be designed - and whether I would take the designing and hosting upon myself. It's mostly just a question if the system would actually be used on servers.
     
  8. Offline

    russellsayhi

    Hmm. Where would all the data go if it wasn’t on a server? And thank you! (If you do make it, I’d really appreciate it :) )

    Mmk. D=

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  9. Offline

    np98765

    If you get a dev, like Superkabii , to pay for the hosting and develop it... But it might be hard to get someone to take the risk, in case it's a flop...

    Good luck, though; I wish you the best!
     
  10. Offline

    Superkabii

    It would be on a central server. Even if a server-to-server design was to be created, a central server would be needed to report the existence of what other servers run the plugin.
    I do already own a capable server box, so the actual hosting would be easier indeed.
     
  11. Offline

    russellsayhi

    Thank you!

    So you think you could do it? ‘Cause that’d be awesome!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  12. Offline

    KongDongCricket

    I created a plugin for ahhem... terraria ...ahhem... that does some of what you've requested. Instead of doing server-2-server messaging, it was simply from the server to the individuals. The individuals could also reply to those email messages and they would be delivered to the players if they were connected (or potentially relay or wait in a queue).

    I developed it from the standpoint of notifying other players via email when a specific user joined the server.

    I would be interested in porting my C# code to java, but my java experience is very little. Given the server architecture change on top of the code port, it would really be more of a rewrite... However, it there is significant interest, I would be willing to participate in the dev.
     
  13. Offline

    russellsayhi

    Well I’d be really happy if you could do it! :)
    Only one thing, though, I already thought of e-mail messages from in game, and I wouldn’t want that. It wouldn’t be the same, I like in game chat better.
     
  14. Offline

    KongDongCricket

    It could probably be done via IRC but as I'm thinking about it, that might not work. Of course the channel would have to be restricted in that only servers can connect to it. This could be done by issuing certs or server tokens via SSL to the individual servers. Of course the server owner would have to do the registration and enter the info the first time the plugin is loaded. The only issue would be queuing messages on the IRC server side until the player joined a server somewhere... I'm not informed on IRC and someone else may be more knowledgeable on wether that would be possible.

    My idea goes something like this:

    CraftBukkit Plugin and Central Server COMs:
    1.) Owner downloads messaging plugin and goes to centrally hosted server website to register and receive a md5 hash.
    2.) Owner starts craftbukkit and messaging plugin loads for the first time creating necessary files/folders and config.
    3.) Owner enters md5 hash either through console or directly into config file.
    4.) Messaging plugin then attempts to connect to IRC-like server using the md5 hash or some derivative.
    5.) Messaging plugin sends Central Server a list of player names when it connects or as players join the server, then sends on player's name to the Central Server

    Player Joins Server with Messaging Plugin Configured:
    1.) Player joins Bukkit server with messaging plugin.
    2.) Plugin notifies Central Server that player has joined.
    3.) Central Server looks in DB for player ID and corresponding email address. Central Server adds record to DB with Player ID, Server IP/Name, DateTime connected. Central Server sends Player a message acknowledging his/her connection/registration.
    4.) If Player has does not have a registered email address, Central Server sends Player a message prompting him/her to enter the command to register email address with Central Server.
    5.) Player enters command to register email address.
    6.) Plugin relays info to Central Server.
    7.) Central Server adds new record for Player ID and email address into DB and responds with message to Player repeating email address and command to change or remove email address and/or Player data from Central Server.

    Message Flow Between Players Abe and Brad:
    1.)Abe and Brad on same server.
    a.) Abe send Brad message.
    b.) Plugin recognizes both players and sends message directly to Brad.
    2.) Abe and Brad on different servers.
    a.) Abe sends Brad message.
    b.) Plugin recognizes Abe and not Brad, plugin sends message to Central Server.
    c.) Central Server knows where Brad is and relays message to appropriate server.
    3.) Abe on ServerA and Brad is offline.
    a.) Abe sends Brad message.
    b.) Plugin recognizes Abe and not Brad, plugin sends message to Central Server.
    c.) Central Server hasn't been notified that Brad is connected to any server.
    d.) Central Server determines True/False that Brad has registered email address.
    True.) Central Server messages Abe telling that the message has been relayed to Brad via email.
    False.) Central Server messages Abe telling that Brad is offline and that Brad doesn't have a registered email address.

    Plan For Distributed Central Server:
    1.) Central Server comes online with registered md5 hash.
    2.) Retrieves list of Central Servers from registration site.
    3.) Central Server notifies other Central Servers directly that is is online.
    4.) Other Central Servers puke essential registered Player info to new Central Server thus replicating the DB. (Central Server needs large pipe...)
    5.) Central Servers replicate Player history info with limited transaction flow as to not flood the pipe.
     
  15. Offline

    Superkabii

    KongDongCricket
    As I see it, IRC as a central connectivity point wouldn't be the best idea although possible. It would be far too prone to issues outside of the system's reach, netsplits and clientside ping drops.

    The central server would preferably be hosting a servlet for our system, responding to a CB server's requests.. We maintain a connection with the other machines to make sure they're still connected. This may be prone to the server believing a player is still online if a CB server disconnects unexpectedly, temporarily.

    I'm not sure if a distributed design across more than one server would be needed for this design, but feel free to prove me wrong.

    This is also for simplicity sake. It would be more ideal to not require registration and entry of keys. So long as the system ensures online-mode, there should be no misinterpretation of data.

    The danger here is obviously third parties creating a small program to connect to the central server and request mail for a user that is not their own. However, an API key system would not resolve this issue due to the nature of usernames. If we're going for data security this idea of simplicity wouldn't be effective, an authentication system for individual users would be needed.
     
  16. Offline

    KongDongCricket

    Superkabii

    I agree that IRC is not an ideal solution.

    I agree that a distributed system adds a major layer of complexity which wouldn't be necessary if it was totally web server based.

    I don't know about a servlete, but maybe even so simple as a php based site with MySQL backend. Polling from the CB plugin wouldn't be necessary to the Central Server if the plugin were to expose a web server interface that the CB server could reach out to when a new message arrives which would also ensure online mode. Either way, this web server based central server seems much more feasible both dev wise and fiscally.

    If using a polling method done by the CB server plugin, you can verify online status by having the Central Server hold the messages until the CB server polls with a list of connected players. If the player doesn't appear as online via polling queries during "X" number of polls or equivalent "'X' number of poll cycles time period", the Central Server assumes the player is offline and then sends the message via email.

    I agree that third party player impostors could be a problem and thus spamming being an issue. However, I don't know that making a player authenticate to the messaging system is a viable option as it adds a layer of complexity thus driving players away from using it. Unless, we provide an option to register via the in-game console which I guess wouldn't be unrealistic.

    Is there a way to query the CB server via the normal minecraft port to validate players connected? This may resolve concerns about online status of players as well as circumvent a significant number of third party player impostors.
     
  17. Offline

    Superkabii

    KongDongCricket
    After considering the options, I bring up the servlet for the data accuracy factor. Maintaining a connection to the central server would be a safe way to ensure the server is still up before we send any messages, since pinging and the like would be trivial. It is also a feasible way for the servers to report the current player status - whether a player is leaving or joining. I loved the idea of a JSON-based site originally - however due to the level of updates needed I'm not sure something so simple would be a good idea.

    For the authentication issue I was more worried about interception of messages - spamming wouldn't matter as that would happen the same regardless because players could always send it. I wouldn't ever mean the players needing to sign up at a site - I would prefer no site necessary to use the services at all. I did mean an in-game method, however I would really prefer this not being needed quite obviously. It would be a neat service if it was just plug-and-play as so you might message a player anywhere. Not only if they've signed on and registered an account already.

    I'm not sure the validation would really matter - a third-party application could likely spoof that despite. I don't honestly think a third-party would be a danger.. it would take a great deal of work and need a specific target regardless. Although I don't agree with leaving open holes in a system - it would likely be much more simple for the end users.
     
  18. Offline

    KongDongCricket

    Superkabii

    I agree that a servlet is probably the most robust solution.

    I keep going back and forth on the Player authentication or validation and the necessity of it. Honestly, we are only talking about chat messages here...

    Now, on to the development aspects... I'm a C*variation guy (VC++, C++, C#, etc...) as well as VB6/VB.NET and I have had a little experience with Java. However, producing a servlet that works and is efficient may be very well out of my range. I know I could produce something that works, but could potentially be very buggy. AND, this would be my first attempt at a plugin for CB as well as using sockets in Java. So, I'm doing some reading now on getting Eclipse working with Tomcat 7 as a dev platform. I'm also reading up on the basics of Java servlets and how those work. I don't blame anyone for suggesting this may be out of my league, but I am still going to push into the dev just to prove to myself that I can.
     
  19. Offline

    Superkabii

    KongDongCricket
    On the contrary, I've only worked with Java and PHP before. Heh.
     
  20. Offline

    russellsayhi

    I’m sorry, but I don’t really understand much of this. But, from what I did, there is concerns about the security of and way to host/type of the central server. What I thought we could do for the security issue is requiring all servers have a certain amount of active premium minecraft users if that would be possible. Also, I was hoping that it could be less of an e-mail system (where you get emailed if you were offline) and more of like the mail system that comes with Essentials that simply says "1 new message!" in-game.
     
  21. Offline

    KongDongCricket

    russellsayhi
    Ah, I see what you're getting at... That does suggest the need for a player to authenticate to the messaging system since the messages won't necessarily be "instant" and instead wait in a "mailbox" for the player to retrieve them. This also opens the door for a player to visit the Central Server's website (if it existed) for them to check their messages there as well as potentially send messages, maintain a contact list, etc... like a full blown webmail system.

    Superkabii
    Anyone hearing the rattle of change in a cup as they think of Google AdSense banners on the messaging system website?
     
  22. Offline

    flx5

  23. Offline

    russellsayhi

    I actually understood that, and nice idea!

    Thank you guys so much for supporting this idea! :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  24. Offline

    Joshua Burt

  25. Offline

    KongDongCricket

    Joshua Burt
    Thanks for linking that! Very interesting and the package send/receive I have thought of in this process...

    Superkabii
    Forking this and making it route through our plan of a "Central Server" might fast-track the dev... What do you think?
     
  26. Offline

    kezz101

    Omnitv likes this.
  27. Offline

    russellsayhi

    Thanks for working on this! :D I appreciate it!
    kezz101 Bukkit link doesnt work for ALL servers with the plugin auto
     
  28. Offline

    kezz101

    No you have to set it up of course!
     
  29. Offline

    turt2live

    So while looking for mail plugins (so I can import their mail), I came across this and thought I'd drop a self-promotion.

    (I have not read any comments, be warned)

    xMail is a project I've been working on (and it's, I think, nearing completion), if you're interested, take a read on the experimental bukkit dev page
     
  30. Offline

    russellsayhi

    Awesome! I love xMail! But just wondering, with the sending items cross-server, you can disable that right?
    Another question about xMail - Does it auto work for all servers with the plugin, or do you have to link servers?
    Great job on that plugin! I’m looking forward to the release :D
     

Share This Page