8

When I open a message with an attachment and choose to "Open" the attachment, thunderbird downloads the attachment and saves it in /tmp and then opens it.

For security reasons I would like to be able to change the directory where the file is saved from /tmp to somewhere (I will use an encrypted volume). I cannot find a setting in thunderbird to do this, does anyone know if this is possible?

Jon Brett
  • 379
  • Does Thunderbird put them in /tmp directly, or does it use a sub-directory of /tmp? – Stefano Palazzo Jan 04 '11 at 11:52
  • 1
    It puts them directly in /tmp – Jon Brett Jan 04 '11 at 12:37
  • I would recommend to use tmpfs for /tmp, that will prevent the data from being stored on disk. If there is a user logged on with admin privileges it will be able to access your encrypted data as soon your are logged in anyway. – João Pinto Jan 04 '11 at 13:26
  • 1
    I am the only user on my machine with local root access. I need to avoid storing this data in the clear.

    Besides, the merits (or not) of encryption are beyond the scope of my question which concerns changing the temporary storage directory of thunderbird

    – Jon Brett Jan 04 '11 at 14:36

2 Answers2

4

I have a workaround: Thunderbird uses the standard environment variable $TMP by default to determine where to store temporary files. It also uses this folder when you select to "Open" a mail attachment.

Therefore I have simply made a simple script to set this environment variable before launching thunderbird. I have modified my thunderbird shortcuts to use this script.

#!/bin/sh
export TMP=/media/truecrypt1/scratch
nohup thunderbird &

I would still be interested if anyone else has a more elegant solution; perhaps one that only affects the storage location of "Opened" attachments.

Jon Brett
  • 379
0

If you use an encrypted container, consider mounting a tmpfs over /tmp. This won't be encrypted, but it will be stored only in RAM and its contents will not persist over reboots.

Add this to /etc/fstab:

tmpfs           /tmp            tmpfs   noatime,mode=1777      0       0