Errors with exim Mail

We have a scrip that we have custom configured on a queue that creates AdminCC and CC. We’ve disabled the global scrip for the queue using the following custom code (including this code because someone else might find it a very helpful way to disable global scrips on a queue by queue basis):
my @exceptionQueue = ('__Approvals’);
my $transactionType = $self->TransactionObj->Type;
my $queue = $self->TicketObj->QueueObj->Name;
if ($transactionType eq ‘Create’) {
return if grep { $queue eq ($
) } @exceptionQueue;
return 1;
}
return;

This all appears to be working great, but sometimes we receive the following error:
[Tue May 8 12:24:41 2012] [crit]: rt-3.8.4-29771-1336479881-1523.135333-149-0@domain.com: Could not send mail with command /usr/sbin/exim -oi -t: program unexpectedly closed pipe at /usr/lib/rt/RT/Interface/Email.pm line 408, line 33.

I’ve done some testing, and I have created the same exact ticket in RT multiple times that should send out the same exact notifications. Sometimes the notifications are sent and sometimes I get the error above. Anyone have any ideas as to why this might work sometimes but not others?

We are using:
RT 3.8.4

The process that I am seeing this issue in is a little complex:

  1. Create a Master Work Ticket in a request queue.
    
  2. On creation, custom fields are checked and up to 5 different approval tickets are created based on the supplied information.  AdminCC and CC are sent out (using scrips & templates in the ___Approval queue) on creation of the approval ticket.
    

I’m working on implementing a number of changes on my production box. All of my testing is currently on my dev box. I’m not actually sending/receiving any emails at this point in time, only looking in the ticket history to see if the correct email was generated. I’m not seeing the same issues on my production box. Any ideas?

-Jennifer

149-travel.txt (4.54 KB)

149-user.txt (3.42 KB)

Hi,

It’s hard to tell what’s wrong. Basicly what happens is that exim
closed input stream while RT still was printing mail to the stream.
Probably exim printed something about the problem to STDERR or STDOUT.
If it’s STDERR then there is good chance it ended in apache’s log. If
STDOUT then it’s somewhere in wild. You have more chances to find
reason in exim’s logs. Increasing logging in exim is good way to
start. You just have to match entries in one log to other log.

If it’s not helpful then the only way is to use IPC::Run3 or similar
module in lib/RT/Interface/Email.pm where exim is executed. In this
case it’s possible to catch STDERR and STDOUT and put them into RT
logs. We may even accept good patch that does this.On Tue, May 8, 2012 at 5:35 PM, Jennifer Koermer JKoermer@prg.com wrote:

We have a scrip that we have custom configured on a queue that creates
AdminCC and CC. We’ve disabled the global scrip for the queue using the
following custom code (including this code because someone else might find
it a very helpful way to disable global scrips on a queue by queue basis):

my @exceptionQueue = (‘___Approvals’);

my $transactionType = $self->TransactionObj->Type;

my $queue = $self->TicketObj->QueueObj->Name;

if ($transactionType eq ‘Create’) {

return if grep { $queue eq ($_) } @exceptionQueue;

return 1;

}

return;

This all appears to be working great, but sometimes we receive the following
error:

[Tue May 8 12:24:41 2012] [crit]:
rt-3.8.4-29771-1336479881-1523.135333-149-0@domain.com: Could not send
mail with command /usr/sbin/exim -oi -t: program unexpectedly closed pipe
at /usr/lib/rt/RT/Interface/Email.pm line 408, line 33.

I’ve done some testing, and I have created the same exact ticket in RT
multiple times that should send out the same exact notifications. Sometimes
the notifications are sent and sometimes I get the error above. Anyone have
any ideas as to why this might work sometimes but not others?

We are using:

RT 3.8.4

The process that I am seeing this issue in is a little complex:

  1. Create a Master Work Ticket in a request queue.
    
  2. On creation, custom fields are checked and up to 5 different approval
    

tickets are created based on the supplied information. AdminCC and CC are
sent out (using scrips & templates in the ___Approval queue) on creation of
the approval ticket.

I’m working on implementing a number of changes on my production box. All
of my testing is currently on my dev box. I’m not actually
sending/receiving any emails at this point in time, only looking in the
ticket history to see if the correct email was generated. I’m not seeing
the same issues on my production box. Any ideas?

-Jennifer

Best regards, Ruslan.