diff --git a/Lib/mailbox.py b/Lib/mailbox.py --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -692,6 +692,13 @@ self._file = open(self._path, 'rb+') self._toc = new_toc self._pending = False + # Set modification time to be after access time so that MMDF and MBOX + # mail readers detect new mail + try: + currtime = time.time() + os.utime(self._path, (currtime-3, currtime)) + except: + pass if self._locked: _lock_file(self._file, dotlock=False)