Correspondence with attachments

Hi,

I’ve run into problem which I cannot solve myself. So, please help.
We are running RT 2.0.15 on FreeBSD 5.0, apache-1.3.27_1,
mod_fastcgi-2.2.12

When I send raw mail without attachments it’s beeing processed Ok. But
whis any attachment I get following reply:

The original message was received at Fri, 28 Feb 2003 12:25:43 +0300
(MSK)
from [192.168.1.166]

----- The following addresses had permanent fatal errors -----
"|/opt/rt2/bin/rt-mailgate --queue Develop --action correspond"
(reason: 255)
(expanded from: develop@xxxxx.ru)

----- Transcript of session follows -----
Use of uninitialized value in split at /usr/local/lib/perl5/5.6.1/Cwd.pm
line 103.
MIME::Parser: can’t open tmpfile: Invalid argument
554 5.3.0 unknown mailer error 255

More over. I figured out that when I add $parser->tmp_to_core(20000); to
lib/RT/Interface/Email.pm then it works! As I understand problem is that
it can not create tmp file. But why?
I suspect that permissions must have been tuned. But where?

Please, help.
Sergey.