Archive2Mail ChangeLog ====================== TODO: * Handle max message size and files greater than it (split file to multiple mails?). * Canceling outgoing SMTP transfer. * SMTP/POP3 connections in different threads (sending big files makes UI not responding). * Compare MD5/SHA hashes of files in mailbox with local files and upload mismatched (or suggest uploading?). * Uploading many files to mailbox may exceed POP3 or mailbox limits. Consider creating subdirs... but POP3 protocol does not allow them and we cannot use IMAP (for popular free mail services). Archive2Mail may try to detect maximum number of mail messages in mailbox and inform user. * If mail or file exists and user didn't specified "--force" ask for confirmation. 2010.04.22 Krzysztof Kozłowski (http://www.kozik.net.pl) Version 1.2.0, new features and security bug fix release User visible/important changes: * Use HMAC with hashes to detect forged mails. Solves important security problem when restoring files (someone may send malicious mail pretending it is from Archive2Mail). * Add new item to configuration file - private key used in HMAC. Needs update'ing of your configuration file. * Ability to restore files from backup - download mails, save attachments, check file integrity (compare with hashes found in mail). * Add program argument (-r, -b, -e) for choosing action (restore, backup, create example configuration). * Add program argument (-d) for setting destination directory (in restore mode). * Add program argument (--header-lines-to-fetch) for changing number of header lines to fetch for each message. * In restore mode treat additional arguments as filter components. Other code changes: * Fix ChangeLog typos and spelling errors. * Some code and comments cleanup. * Add new items in program usage/help, fix spelling and change others. * Fix malformed path bug for default configuration file on Windows systems. * Remove ObjectPrototype class from whole project (it was a bad idea) and implement previously inherited methods directly in other classes. * Replace in all modules some "import *" statements with importing specific modules or variables. * Remove unneeded or stale imports. * Add and correct documentation. * Throwing exception instead of debug_msg() when trying to send files with disconnected MailboxWriter. Add test case for it. * arch2m: * Extract code for setting the option parser to separate function. * Fix proper default integer value for limit_sent_files option in parser. * class_archive2mail.py: * Be sure to always close mailboxes (try-finally). * class_parameters.py: * Correct some language typos in generated example configuration file. * Convert types to proper ones in all field assignments - ensure class stores proper value types. * class_mailbox_reader.py: * Add new method for searching by name for mail_ids in fetched mails. * Rename old method mail_in_mailbox() to shorter name. * Properly handle poplib exceptions on LIST, RETR and TOP commands (they may occur when message is removed from mailbox while program is running). * class_mailbox_reader.py, class_mailbox_writer.py: * Add host and port to exception message thrown on connection error. * class_error.py: * Add new exceptions. * class_mail.py: * Split get_subject() body into get_subject() and get_filename(). * Store parsed subject/filename strings for later usage (won't have to parse it on each get_subject() invocation). * Add missing return statement for if-fail (return empty string). * Add field with list of hashes used in mail (Mail.COMPUTED_HASHES). * Change _compute_hash() method to staticmethod compute_hash(). * Add methods for extracting from mail attachment and saving it. * Generate and check old and new type hashes. * config.py: * Limit fetched lines to 64 for each mail. * Add variables for choosing which hash types create and check. * test_mail.py: * Anonimize test data. * Add test cases for new Mail methods. * Add test cases for Archive2Mail - test_archive2mail.py. 2009.10.25 Krzysztof Kozłowski (http://www.kozik.net.pl) Version 1.1.0 User visible/important changes: * Split "mail_addr" configuration parameter into pair "from_mail_addr" and "to_mail_addr". This should allow connecting to different mail servers and sending from one mail address to another. Old configuration file is incompatible with new format. * Add parameter -l/--limit to limit the number of sending files (e.g. to send just one file). * If file cannot be handled because of max message size - continue instead of exiting. Other code changes: * class_object_prototype.py: Add info_msg() to ObjectPrototype, so every class can print info messages. * class_mailbox_reader.py: Add printing mails to fetch. * class_parameters.py: Add missing declaration of self._pretend field. * class_mailbox_writer.py: * MailboxWriter.send_mail(): Add parameter file_name for printing debug/info messages. * MailboxWriter.send_mail(): Return boolean value to indicate that file was actually sent (used with non-fatal errors like when file is skipped because of its size). * Do not raise exception if mails are to big. * class_archive2mail.py: * Add counters for sent files. * Different messages for pretend mode after sending a file. 2009.09.05 Krzysztof Kozłowski (http://www.kozik.net.pl) Version 1.0.1, bug fix release User visible/important changes: * Add new parameter "-p/--pretend" for dry-run (without sending). Other code changes: * class_archive2mail.py: Fix timeout bug in MailboxReader.quit() (quit immediately after fetching all messages, not after sending all files). * class_mail.py: * Fix subject splitting bug in parsed mails from MailboxReader. Replace "\r\n\t" in subject with single space. * Fix file name bug when subject is split to multiple lines. Do not fold lines when constructing new mail. * Set UTF-8 charset for text part of message for handling files with national/Unicode characters. * class_mailbox_reader.py: Reset internal mails property to new list after connecting (we will fetch new mails). * test_mail.py: Additional test cases and test files for Mail class. 2009.08.31 Krzysztof Kozłowski (http://www.kozik.net.pl) Version 1.0.0