From: Tim R. <ti...@ph...> - 2011-05-17 16:42:07
|
On 5/17/2011 10:10 PM, Malahal Naineni wrote: > Tim Rice [ti...@ph...] wrote: >> Hi All, >> >> I get the following errors when running under crontab. If I run from >> the command line I don't get any errors. >> >> Any idea why Cran is breaking this? >> >> Traceback (most recent call last): >> File "/usr/local/bin/archivemail", line 1604, in<module> >> main() >> File "/usr/local/bin/archivemail", line 703, in main >> archive(mailbox_path) >> File "/usr/local/bin/archivemail", line 1149, in archive >> _archive_mbox(mailbox_name, final_archive_name) >> File "/usr/local/bin/archivemail", line 1220, in _archive_mbox >> retain.write(msg) >> File "/usr/local/bin/archivemail", line 384, in write >> self.mbox_file.write(body) >> IOError: [Errno 28] No space left on device > > Just looked at the code. The archivemail creates a temporary file using > tempfile.mkstemp("retain"). "dir" is not specified, so a default > directory is used. The default directory is chosen from a > platform-dependent list, but the user of the application can control the > directory location by setting the TMPDIR, TEMP or TMP environment > variables. > > So it boils down to the difference of environment variables setting of > TMPDIR, TEMP or TMP under those two execution environments (cron vs > direct). > > If you are comfortable with python, you can just log 'temp_name' in > RetainMbox class just after this "temp_name = tempfile.mkstemp("retain")[1]" > and see what it is under those two different execution environments. > > Hope that helps! > Malahal. Hi Malahal, Thanks for the reply, I'm not that good with Python, but I may be able to find that information out. What you are saying makes sense and I'll defiantly pursue it. Thanks for the input Tim -- Best Regards, Tim Rice Computer Stuff Phuket Thailand 83000 Tel: +66 76 376165 Fax: +66 76 376165 www.computerstuff.net www.phuket-mail.com |