Instead of passing an instance of the MakeMe object like I did in the old version, instead I'm passing relevant callback functions instead, so I can keep everything related to message processing in the MakeMe class. It's a lot tidier this way and I'm much happier with it.
inheriting from dict for configuration is just lazy and stupid.
This commit is pretty big! I've added in security for storing the user's password. It's not the most secure thing in the world but it's much better than storing it plaintext. So for a user to change the account that's used, they must use the set-user.py script. If anyone has serious gripes with my security, they can implement something better as I openly admit I'm not a security expert. I've completely removed my config class and associated functions to ma I've completely removed my config class and associated functions because there's no point reinventing the wheel. The configparser module included in the standard libraries is more then capable, so that's what I'll be using from now on! As a result the use of default config options is much more clean now.
There were a few methods and classes with no docstrings, this is no longer the case. There was a disgusting problem with control flow in threads.py with an inner class that I've rectified.
Just little bug fixes here and there regarding lots of things. Files weren't currently processed for attaching to outgoing emails. Unsent emails will now be saved to a user specified file, specified using the unsent_save_location tag in config files. There was a bug in the MPD script, for random songs that are currently playing, the title may not be retrievable for whatever reason. This is caught and ignored when it occurs. Emails that contained script processing didn't specify who sent the emails they're sending back, this is now fixed. Whenever locking occurs now in code that may bomb out with exceptions, the lock is ALWAYS released in a finally block. This way we know it will always be run.
It would be nice if the server simply restarted itself. This feature has been added to rabbit for future integration.
During message retrieval, a lock was acquired for the entire block. This meant that if it had trouble retrieving emails, it could go for potentially 2 and a half minutes locked up. This has been fixed so that they will only happen for 30 seconds a time now. Still not good, but much better. In the last commit with all my testing, I forgot to uncomment the code that replies to emails. This has now been rectified.
Multiple file attachments can now be added to emails, both sending and receiving. Receiving emails are also handled properly. If the saved_emails script is called then they will be saved to the Downloads directory in the user's home directory.
things. The patterns for scripting were moved out of the for loop and compiled. There was a bug in the ProcessThreadsStarter.run method that meant it would check over and over again, crash or not. I also added some locking into the method as well, and removed threading.iterate() to replace it with a more localised version.
I've added the ability to use default settings if a particular setting isn't found in the config file, which is very nice. This means much tidier config files! Also in this commit is the ability for users to specify other servers as well, so if they want to use hotmail, or yahoo or whatever they can. It's completely untested and will probably remain that way until someone tries it out as I'm perfectly content using gmail for this.