Package: archivemail
Version: 0.9.0-1.1
Severity: normal

archivemail fails on large mailboxes:

Traceback (most recent call last):
  File "/usr/bin/archivemail", line 1951, in <module>
    main()
  File "/usr/bin/archivemail", line 700, in main
    archive(mailbox_path)
  File "/usr/bin/archivemail", line 1133, in archive
    _archive_dir(mailbox_name, "mh")
  File "/usr/bin/archivemail", line 1266, in _archive_dir
    archive.write(msg)
  File "/usr/bin/archivemail", line 566, in write
    self.mbox_file.write(body)
  File "/usr/lib/python2.7/gzip.py", line 243, in write
    self.fileobj.write( self.compress.compress(data) )
IOError: [Errno 28] No space left on device

This is despite the output directory ("-o some_directory") having plenty of
space. The problem is that archivemail constructs a temporary mailbox
containing all the messages to archive in the default temporary directory, and
will therefore fail if that directory is not large enough. I do not believe
this is documented in the program's documentation, and the program itself should
exit more gracefully and provide the user with a clearer explanation of the
problem. In any event, the solution is to use environment
variables to point archivemail toward a tmp directory with enough space, by
prefacing the call to archivemail with something like:

export TMPDIR=/some_dir


-- System Information:
Debian Release: 8.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.30-lizzie (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages archivemail depends on:
ii  python  2.7.9-1

archivemail recommends no packages.

archivemail suggests no packages.

-- no debconf information

Reply via email to