Trust No Program

Thunderbird Temp-Folder-Access and my solution

Please post your problem description here

Thunderbird Temp-Folder-Access and my solution

Postby norfolk » Tue Jul 09, 2013 7:17 pm

Hi,

since about Sandboxie 4.02 and now 4.04, Thunderbird (latest) was bugging me with following message.
I run it at Win 7 64 bit in an extra sandbox only for Firefox and Thunderbird, standard-settings with extra access to one folder for saving downloaded files.

(translated to english - not original)
Send of message failed.
Temporary File C:\Users\MyUser\AppData\Local\Temp\nsmail.tmp could not be opened.
Check your Settings for "Temporary Directory".

Thunderbird uses the default temp. of the windows system.

By adding the following code to setting/application/local, it seems as if it's working again.

[Template_Local_Thunderbird_Temp]
Tmpl.Title=Thunderbird Temp
OpenFilePath=thunde~1.exe,%Local AppData%\Temp
OpenFilePath=thunde~1.exe,%AppData%\Temp
OpenFilePath=thunde~1.exe,%Tmpl.Thunderbird%
OpenFilePath=thunderbird.exe,%Local AppData%\Temp
OpenFilePath=thunderbird.exe,%AppData%\Temp
OpenFilePath=thunderbird.exe,%Tmpl.Thunderbird%
Tmpl.Class=Local

So here is my question:
If that behavior is default, you might as well include the temp-folder into the default settings for thunderbird.

Also I am not sure if my code is "good" or opens some doors, as it's only done by trial-and-error, not by understanding. A short confirmation or correction would be appreciated. ;)
norfolk
 
Posts: 2
Joined: Tue Jul 09, 2013 6:23 pm

Postby Guest10 » Tue Jul 09, 2013 8:56 pm

An Internet search finds a number of bug reports concerning that file and others, but I've never had that problem:
"nsmail.eml, nsmail.tmp, and nsmail.html are all temporary files that might be created when sending a message".
It seems to be associated with forwarding of a message, and the temporary file remaining behind.

When Thunderbird is not running, have you deleted the files in the %Local AppData%\Temp folder, outside of the sandbox?
At least, those files that don't have a lock on them and refuse to be deleted.
Especially look for a file by that name: nsmail.tmp

I don't have an %AppData%\Temp folder on XP, and I suspect that you don't need two of those settings.

[Template_Local_Thunderbird_Temp]
Tmpl.Title=Thunderbird Temp
OpenFilePath=thunde~1.exe,%Local AppData%\Temp
OpenFilePath=thunde~1.exe,%AppData%\Temp
OpenFilePath=thunde~1.exe,%Tmpl.Thunderbird%
OpenFilePath=thunderbird.exe,%Local AppData%\Temp
OpenFilePath=thunderbird.exe,%AppData%\Temp
OpenFilePath=thunderbird.exe,%Tmpl.Thunderbird%
Tmpl.Class=Local

I don't see any big problem with using those settings, although they do let any file be saved to the 'Temp' folders regardless of the file name or extension (such as .exe).

If the file name you see is always "nsmail.tmp" you could narrow down the settings to only allow Direct Access to that one file, or to files with a .tmp extension:

Examples:
OpenFilePath=thunde~1.exe,%Local AppData%\Temp
OpenFilePath=thunderbird.exe,%Local AppData%\Temp

could become:
OpenFilePath=thunde~1.exe,%Local AppData%\Temp\nsmail.tmp
OpenFilePath=thunderbird.exe,%Local AppData%\Temp\nsmail.tmp
or,
OpenFilePath=thunde~1.exe,%Local AppData%\Temp\*.tmp
OpenFilePath=thunderbird.exe,%Local AppData%\Temp\*.tmp

You could add the bold part of those settings to the template using Configure > Edit Configuration.
Paul
XP Pro SP3 (Admin), Zone Alarm Pro Firewall, Malwarebytes Pro, Firefox 31, Thunderbird 31
Guest10
 
Posts: 4808
Joined: Sun Apr 27, 2008 10:24 pm
Location: Ohio, USA

Postby norfolk » Wed Jul 10, 2013 6:49 am

About the reason, yes it looks that way. When testign, I deleted those nsmail.tmp-files everywhere in and out of sandboxie. My Thunderbird saves such temp-files when writing an email for some minutes. As soon as the tmp-file is saved, it appeared inside the sandboxie-folders, but they should be deleted after sending the email away again - and this doesnt happen, instead the error appeared.

With the added directory as written before, it seems to work now. I'll check your version of the template-code.
norfolk
 
Posts: 2
Joined: Tue Jul 09, 2013 6:23 pm

Reply to topic Thunderbird Temp-Folder-Access and my solu

Postby iskibum » Sun Dec 01, 2013 4:01 pm

Hi,

I'm not sure where to put or how to enter the information provided. For the first solution, do I create a new folder called [Template_Local_Thunderbird_Temp], with the commands, in the local folder? As for updating the config it seems that I can only enter one of the commands for penFilePath=thunde~1.exe,%Local AppData%\Temp\*.tmp

I'd appreciate any additional detail for clarification you can provide.

Thanks!
iskibum
 

Re: Reply to topic Thunderbird Temp-Folder-Access and my

Postby Guest10 » Sun Dec 01, 2013 5:03 pm

iskibum wrote:I'm not sure where to put or how to enter the information provided.
The local template that's listed above would be entered at:
(Right-click the sandbox name in Sandboxie Control's window) > Sandbox Settings > Applications > Local > Create New button. Paste a copy of the local template in the window - OK
Then you would use:
Sandbox Settings > Applications > Local > select the template and click the "Add" button. OK.

As I stated above, I don't like the fact that this local template would allow Thunderbird to save any file to the Temp folder - even a .exe program, that might then be accidentally run by the user.
It's much better to limit what files can be saved out of the sandbox by putting some restrictions on it. For example, if the file that's causing a problem has a .tmp extension, then settings could be used that only allow files with that extension to be saved.
Likely, you wouldn't even need to use a local template if it's just one or two file types that are causing a problem.
If you list the file names that are causing a problem I can tailor the settings for you to use.
Paul
XP Pro SP3 (Admin), Zone Alarm Pro Firewall, Malwarebytes Pro, Firefox 31, Thunderbird 31
Guest10
 
Posts: 4808
Joined: Sun Apr 27, 2008 10:24 pm
Location: Ohio, USA


Return to Problem Reports

Who is online

Users browsing this forum: No registered users and 6 guests