diff --git a/TODO b/TODO index ab7286e..7f9ab70 100644 --- a/TODO +++ b/TODO @@ -1,24 +1,29 @@ +.archivemailrc support -Goals for next minor release -------------------------------------- -* .archivemailrc support -* When you get a file-not-found in the 6th mailbox of 10, it aborts the whole - run. Better to fail gracefully and keep going. -* Think about the best way to specify the names of archives created with - possibly an --archive-name option. -* Add more tests (see top of test_archivemail.py) -* We need some better checking to see if we are really looking at a valid - mbox-format mailbox. -* Lock any original .gz files - - is this necessary? -* Check for symlink attacks for tempfiles (although we don't use /var/tmp) +When you get a file-not-found in the 6th mailbox of 10, it aborts the whole +run. Better to fail gracefully and keep going. -Longer Term goals: ------------------- -* Add an option to not cut threads. -* Add MMDF mailbox support -* Add Babyl mailbox support -* Add option to archive depending on mailbox size threshold - - is this a good idea? -* Add option to archive depending on number of messages - - is this a good idea? +Think about the best way to specify the names of archives created with +possibly an --archive-name option. + +Add more tests (see top of test_archivemail.py) + +We need some better checking to see if we are really looking at a valid +mbox-format mailbox. + +Lock any original .gz files +- is this necessary? + +Check for symlink attacks for tempfiles (although we don't use /var/tmp) + +Add an option to not cut threads. + +Add MMDF mailbox support + +Add Babyl mailbox support + +Add option to archive depending on mailbox size threshold +- is this a good idea? + +Add option to archive depending on number of messages +- is this a good idea? diff --git a/archivemail.py b/archivemail.py index 3ec7d04..e8f3aab 100755 --- a/archivemail.py +++ b/archivemail.py @@ -1007,7 +1007,10 @@ def archive(mailbox_name): # check to see if we are running as root -- if so, change our effective # userid and groupid to that of the original mailbox + + former_gid = None # groupid doesn't have to be '0' for root on solaris 8? if (os.getuid() == 0) and os.path.exists(mailbox_name): + former_gid = os.getgid(); # remember this so we can change back mailbox_user = os.stat(mailbox_name)[stat.ST_UID] mailbox_group = os.stat(mailbox_name)[stat.ST_GID] vprint("changing effective group id to: %d" % mailbox_group) @@ -1054,7 +1057,7 @@ def archive(mailbox_name): # if we are running as root, revert the seteuid()/setegid() above if (os.getuid() == 0): vprint("changing effective groupid and userid back to root") - os.setegid(0) + os.setegid(former_gid) os.seteuid(0)