Happened after patch

Need some help. I patch opensuse 12.3 yesterday for the Shellshock Bash Threat.

Now I get the following error.
msg 3/68 (19058 bytes), delivery error (command rt-mailgate 15079 wrote to stderr: cannot chdir to /root from /tmp/9RCVS3sfzz: Permission denied, aborting. at /usr/lib/perl5/site_perl/5.16.2/File/Temp.pm line 784.)

Here is the perl script I am running as a cron job
use DBI;
use Proc::ProcessTable;
use Process;
use DateTime;

my $command2 = " ";
my $currentID = $$;
my $dt = DateTime->now;

open(FILE, “ps aux|”);
while ()
{
(my $uid,my $pid,my $cpu,my $mem,my $vsz,my $rss,my $tty,my $stat,my $start,my $time,my $command,my $command1,my $command2) = split;

$command .= $command1 // “Unknown”;
$command .= $command2 // “Unknown”;

my $result = index($command, “/usr/bin/getmail”);
if ($pid ne $currentID)
{
if ($result > -1)
{
print “$dt Scrip already running $command $pid $currentID $result\n”;
exit;
}
}
}
if(! chdir(“/root”)){
print “\n cannot change the working directory \n”;
}

system(“getmail -r /opt/rt4/etc/getmail/getmailHelpdesk -g /opt/rt4/etc/getmail”);
#system(“getmail -r /opt/rt4/etc/getmail/getmailCUHelpdesk -g /opt/rt4/etc/getmail”);
#system(“getmail -r /opt/rt4/etc/getmail/getmailPartnerRequest -g /opt/rt4/etc/getmail”);
system(“getmail -r /opt/rt4/etc/getmail/getmailBounce -g /opt/rt4/etc/getmail”);

Here is my getmail config
[retriever]
#type = SimpleIMAPSSLRetriever
#server = imap.gmail.com
#port = 993
#username = testcopesan@gmail.commailto:testcopesan@gmail.com
#password =
#mailboxes = (‘BBaker’,)

type = SimpleIMAPSSLRetriever
#server = pod51010.outlook.com
server = outlook.office365.com
port = 993
username =
password =
mailboxes = (‘To_Request_Tracker’,)

[destination]
type = MDA_external
path = /opt/rt4/bin/rt-mailgate
user = rt
group = rtgroup
arguments = (“–url”, “http://localhost/rt”, “–queue”, “IT Helpdesk InBox”, “–action”, “correspond”,)

[options]
read_all = false
delete = false
received = True
delivered_to = false
delete_after = 30
max_messages_per_session = 1
message_log = /opt/rt4/var/log/Helpdeskmail.log

When retrieving messages. Two things are happening

1: I am getting multiple Tickets from one email every time I retrieve emails.
2: I get directories left over in the tmp directory with strange names
Ie:
1WIaWc2pkH
I6oSjd1eH4
TbpZ6dj3i9
c9BeTfQUqN
m_iT06tRYz
rmr3N7P9Y4

Would appreciate help currently system has been down for about 12 hours.

Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726 * 262-783-6261 ext. 2296
bbaker@copesan.commailto:cstephan@copesan.com
www.copesan.comhttp://www.copesan.com/
“Servicing North America with Local Care”