Lost emails!

Hello!

I wrote now several time to the list but it seems that our
problem ist to “special”

So sometimes RT don’t send emails. If I look in the logs I see
lines like:

Nov 17 16:20:48 myrtsys RT: [9992] Scrip Prepare 88 died. - Can’t locate object method “” via package “MIME::Head” at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 180.#012#012Stack:#012 [/opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm:180]#012 [/opt/rt4/sbin/…/lib/RT/Action/Notify.pm:69]#012 [/opt/rt4/sbin/…/lib/RT/ScripAction.pm:223]#012 [/opt/rt4/sbin/…/lib/RT/Scrip.pm:637]#012 [/opt/rt4/sbin/…/lib/RT/Scrips.pm:342]#012 [/opt/rt4/sbin/…/lib/RT/Transaction.pm:189]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:1696]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:1613]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:1456]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Email.pm:1508]#012 [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
Nov 17 16:20:48 myrtsys RT: [9992] Use of uninitialized value in method with known name at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 180.
Nov 17 16:20:48 myrtsys RT: [9992] Use of uninitialized value in method with known name at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 180.
Nov 17 16:20:48 myrtsys RT: [9992] Scrip Prepare 89 died. - Can’t locate object method “” via package “MIME::Head” at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 180.#012#012Stack:#012 [/opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm:180]#012 [/opt/rt4/sbin/…/lib/RT/Action/Notify.pm:69]#012 [/opt/rt4/sbin/…/lib/RT/ScripAction.pm:223]#012 [/opt/rt4/sbin/…/lib/RT/Scrip.pm:637]#012 [/opt/rt4/sbin/…/lib/RT/Scrips.pm:342]#012 [/opt/rt4/sbin/…/lib/RT/Transaction.pm:189]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:1696]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:1613]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:1456]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Email.pm:1508]#012 [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
Nov 17 16:21:47 myrtsys RT: [9992] Ticket 697024 created in queue ‘xyz’ by someone

So the ticket is in the database but the mails were not sended.

We have ~150 Tickets per Day and the problem occurs about 1-3 time per month
I use:
VMware (2 vcpus)
RT 4.2.12
Ubuntu 14.04
perl5 (revision 5 version 18 subversion 2) (normal Ubuntu package)
mysql 5.5.53
apache 2.4.7-1ubuntu4.13

Any idea what I can do? I would try now to built a my own
perl 5.24 (http://www.allgoodbits.org/articles/view/45)

best regards!

Sven Sternberger
System Engineer
Tel.: 040/8998-4397
DESY IT

Hello!

Hi Sven,

Nov 17 16:20:48 myrtsys RT: [9992] Scrip Prepare 88 died. - Can’t locate object method “” via package “MIME::Head” at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 180.#012#012Stack:#012

The “_Local” in the stack trace indicates a local customization your organization has made as being the source of the error. Would you be able to provide your copy of /opt/rt4/lib/RT/Action/SendEmail_Local.pm?

best regards!

Sven Sternberger
System Engineer
Tel.: 040/8998-4397
DESY IT

Best,
Shawn

Hello!

there are no “secrets” in our customization I disabled the check which prevents to
send an email to a queue adress (we process income mails with procmail and automatically
send emails which were adressed to an other queue to the staff member of this queue directly)

best regards!

Sven

----- Ursprüngliche Mail -----

SendEmail_Local.pm (35.1 KB)

Hello!

I now changed some things. I switched to perl 5.24 (perlbrew) and I updated to 4.2.13
but the problem is still the same

Dec 1 12:27:40 rt-xxxx RT: [5776] Ticket 699881 created in queue ‘it-xxxx’ by it-xxxx@desy.de
Dec 1 12:27:40 rt-xxxx RT: [5776] Redundant argument in sprintf at /opt/rt4/sbin/…/lib/RT/Action/Notify.pm line 130.
Dec 1 12:27:40 rt-xxxx RT: [5776] Use of uninitialized value in method with known name at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 1043.
Dec 1 12:27:40 rt-xxxx RT: [5776] Use of uninitialized value in method with known name at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 1043.
Dec 1 12:27:40 rt-xxxx RT: [5776] Scrip Prepare 238 died. - Can’t locate object method “” via package “RT::Action::Notify” at /opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm line 1043.#012#012Stack:#012 [/opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm:1043]#012 [/opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm:580]#012 [/opt/rt4/sbin/…/lib/RT/Action/SendEmail_Local.pm:152]#012 [/opt/rt4/sbin/…/lib/RT/Action/Notify.pm:69]#012 [/opt/rt4/sbin/…/lib/RT/ScripAction.pm:223]#012 [/opt/rt4/sbin/…/lib/RT/Scrip.pm:637]#012 [/opt/rt4/sbin/…/lib/RT/Scrips.pm:342]#012 [/opt/rt4/sbin/…/lib/RT/Scrips.pm:275]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2607]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2578]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2648]

I don’t have an idea how to track down the problem. My next try would be to replace SendEmail.pm with my SendEmail_Local.pm maybe the
customization mechanism is broken?

Best regards,

Sven

PS the actual diff /opt/rt4/lib/RT/Action/SendEmail.pm /opt/rt4/lib/RT/Action/SendEmail_Local.pm

832,838c832,839
< $self->RecipientFilter(
< Callback => sub {
< return unless RT::EmailParser->IsRTAddress( $[0] );
< return "$
[0] appears to point to this RT instance. Skipping";
< },
< All => 1,
< );

Hello!

it would be very helpful if somebody could look at my overlay if it is
syntactical correct overlay file.

I found maybe my problem. I’ve just copied the original file
to SendEmail_Local.pm and make my changes. But when I looked at the end of
the copied file I found "RT::Base->_ImportOverlays();"
which is maybe not a good idea to have it in SendEmail_Local.pm file?

Now I have only the header and the method I’ve changed in SendEmail_Local.pm.

best regards!

Sven

----- Ursprüngliche Mail -----

forgot the attachment

----- Ursprüngliche Mail -----

SendEmail_Local.pm (4.37 KB)

Just for the records, the problem was that I copied
SendEmail.pm to SendEmail_Local.pm. In the “Local” copy
I made my customization.

This is not a good idea because at the end of
SendEmail.pm you find "RT::Base->_ImportOverlays();"
so I gues this triggered an endless loop which most
of the time works nevertheless but occasionally fails
with “copy freed scalar panic” or “Scrip Prepare died”

Now I just have the modified method in "Local"
and it seems to work.

cheers!