EmailParser: Use of uninitialized value $Email

Hilfe zu OTRS Problemen aller Art
Post Reply
robbit
Znuny newbie
Posts: 4
Joined: 08 Apr 2015, 19:23
Znuny Version: 4.0.16

EmailParser: Use of uninitialized value $Email

Post by robbit »

Hallo,

ich habe mit einem OTRS 4.0.16 das Problem, dass manchmal, wenn der Cronjob otrs.PostMasterMailbox.pl läuft, folgender Fehler ausgegeben wird:

Code: Select all

[Wed Jan 31 12:33:04 2018] otrs.PostMasterMailbox.pl: Use of uninitialized value $Email in hash element at /opt/otrs-4.0.16/Kernel/System/EmailParser.pm line 981.
[Wed Jan 31 12:33:04 2018] otrs.PostMasterMailbox.pl: Use of uninitialized value $Email in hash element at /opt/otrs-4.0.16/Kernel/System/EmailParser.pm line 986.
[Wed Jan 31 12:33:04 2018] otrs.PostMasterMailbox.pl: Use of uninitialized value $Email in hash element at /opt/otrs-4.0.16/Kernel/System/EmailParser.pm line 981.
[Wed Jan 31 12:33:04 2018] otrs.PostMasterMailbox.pl: Use of uninitialized value $Email in hash element at /opt/otrs-4.0.16/Kernel/System/EmailParser.pm line 982.
Relevanter Ausschnitt aus der EmailParser.pm:

Code: Select all

[...]
 966 =item _MailAddressParse()
 967
 968     my @Chunks = $ParserObject->_MailAddressParse(Email => $Email);
 969
 970 Wrapper for C<Mail::Address->parse($Email)>, but cache it, since it's
 971 not too fast, and often called.
 972
 973 =cut
 974
 975 sub _MailAddressParse {
 976     my ( $Self, %Param ) = @_;
 977
 978     my $Email = $Param{Email};
 979     my $Cache = $Self->{EmailCache};
 980
 981     if ( $Self->{EmailCache}->{$Email} ) {
 982         return @{ $Self->{EmailCache}->{$Email} };
 983     }
 984
 985     my @Chunks = Mail::Address->parse($Email);
 986     $Self->{EmailCache}->{$Email} = \@Chunks;
 987
 988     return @Chunks;
 989 }
 [...]
Und seine Aufrufe:

Code: Select all

[...]
 216     for my $EmailSplit ( $Self->_MailAddressParse( Email => $Param{Email} ) ) {
 217         $Email = $EmailSplit->address();
 218     }
[...]
 252     for my $EmailSplit ( $Self->_MailAddressParse( Email => $Param{Email} ) ) {
 253         $Realname = $EmailSplit->phrase();
 254     }
[...]
 275     for my $Line ( $Self->_MailAddressParse( Email => $Param{Line} ) ) {
 276         push @GetParam, $Line->format();
 277     }
 
Ich habe versucht, mir stümperhaft nach der Deklaration von $Email und $Cache mit der Ausgabe von $Param{Email} und $Self->{EmailCache} zu helfen und dabei festgestellt, dass $Self->{EmailCache} tatsächlich manchmal leer ist, während $Email es nicht ist.

Ich hoffe, hier kann mir jemand einen Anhaltspunkt geben, woran das liegen könnte. Vielen Dank im Voraus!
Meine Meinung steht fest - verwirrt mich nicht mit Tatsachen. :P
Post Reply