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?

4
  • Does Thunderbird put them in /tmp directly, or does it use a sub-directory of /tmp? Jan 4, 2011 at 11:52
  • 1
    It puts them directly in /tmp
    – Jon Brett
    Jan 4, 2011 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. Jan 4, 2011 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 4, 2011 at 14:36

2 Answers 2

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.

2
  • 2
    Instead of exporting TMP you can define it on the next line; eg write TMP=/media/truecrypt1/scratch nohup thunderbird & on one line. Mar 15, 2013 at 1:41
  • Great discovery. I'm using this now myself. Thanks.
    – Pistos
    Jun 7, 2013 at 18:17
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .