[otrs-cvs] otrs/Kernel/System/PostMaster/Filter AgentInterface.pm, 1.10, 1.11 CMD.pm, 1.6, 1.7 Match.pm, 1.8, 1.9 NewTicketReject.pm, 1.8, 1.9
CVS commits notifications of OTRS.org
cvs-log at otrs.org
Fri Apr 25 13:15:24 GMT 2008
Comments:
Update of /home/cvs/otrs/Kernel/System/PostMaster/Filter
In directory lancelot:/tmp/cvs-serv11732/PostMaster/Filter
Modified Files:
AgentInterface.pm CMD.pm Match.pm NewTicketReject.pm
Log Message:
Replaced OTRS GmbH with OTRS AG. Simplify the code for a better readability.
Author: tr
Index: AgentInterface.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/Filter/AgentInterface.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AgentInterface.pm 2 Oct 2007 10:34:46 -0000 1.10
--- AgentInterface.pm 25 Apr 2008 13:15:18 -0000 1.11
***************
*** 1,5 ****
# --
# Kernel/System/PostMaster/Filter/AgentInterface.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/System/PostMaster/Filter/AgentInterface.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id$
***************
*** 7,11 ****
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
--- 7,11 ----
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
# --
***************
*** 38,44 ****
}
! $Self->{EmailObject} = Kernel::System::Email->new(%Param);
! $Self->{QueueObject} = Kernel::System::Queue->new(%Param);
! $Self->{UserObject} = Kernel::System::User->new(%Param);
$Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
--- 38,44 ----
}
! $Self->{EmailObject} = Kernel::System::Email ->new(%Param);
! $Self->{QueueObject} = Kernel::System::Queue ->new(%Param);
! $Self->{UserObject} = Kernel::System::User ->new(%Param);
$Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
Author: tr
Index: CMD.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/Filter/CMD.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CMD.pm 2 Oct 2007 10:34:46 -0000 1.6
--- CMD.pm 25 Apr 2008 13:15:18 -0000 1.7
***************
*** 1,5 ****
# --
# Kernel/System/PostMaster/Filter/CMD.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/System/PostMaster/Filter/CMD.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id$
***************
*** 7,11 ****
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
--- 7,11 ----
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
# --
***************
*** 52,56 ****
$Self->{LogObject}->Log(
Priority => 'error',
! Message => "Need CMD config option in PostMaster::PreFilterModule job!",
);
return;
--- 52,56 ----
$Self->{LogObject}->Log(
Priority => 'error',
! Message => 'Need CMD config option in PostMaster::PreFilterModule job!',
);
return;
***************
*** 59,70 ****
# execute prog
my $TmpFile = $Self->{ConfigObject}->Get('TempDir') . "/PostMaster.Filter.CMD.$$";
! if ( open( PROG, "|$Config{CMD} > $TmpFile" ) ) {
! print PROG $Self->{ParseObject}->GetPlainEmail();
! close(PROG);
}
if ( -s $TmpFile ) {
! open( IN, "< $TmpFile" );
! my $Ret = <IN>;
! close(IN);
# set new params
--- 59,70 ----
# execute prog
my $TmpFile = $Self->{ConfigObject}->Get('TempDir') . "/PostMaster.Filter.CMD.$$";
! if ( open my $Prog, "|$Config{CMD} > $TmpFile" ) {
! print $Prog $Self->{ParseObject}->GetPlainEmail();
! close $Prog;
}
if ( -s $TmpFile ) {
! open my $In, '<', $TmpFile;
! my $Ret = <$In>;
! close $In;
# set new params
Author: tr
Index: Match.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/Filter/Match.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Match.pm 2 Oct 2007 10:34:46 -0000 1.8
--- Match.pm 25 Apr 2008 13:15:18 -0000 1.9
***************
*** 1,5 ****
# --
# Kernel/System/PostMaster/Filter/Match.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/System/PostMaster/Filter/Match.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id$
***************
*** 7,11 ****
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
--- 7,11 ----
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
# --
Author: tr
Index: NewTicketReject.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/Filter/NewTicketReject.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** NewTicketReject.pm 2 Oct 2007 10:34:46 -0000 1.8
--- NewTicketReject.pm 25 Apr 2008 13:15:19 -0000 1.9
***************
*** 1,5 ****
# --
# Kernel/System/PostMaster/Filter/NewTicketReject.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/System/PostMaster/Filter/NewTicketReject.pm - sub part of PostMaster.pm
! # Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id$
***************
*** 7,11 ****
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
--- 7,11 ----
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
# --
***************
*** 36,40 ****
$Self->{TicketObject} = Kernel::System::Ticket->new(%Param);
! $Self->{EmailObject} = Kernel::System::Email->new(%Param);
return $Self;
--- 36,40 ----
$Self->{TicketObject} = Kernel::System::Ticket->new(%Param);
! $Self->{EmailObject} = Kernel::System::Email ->new(%Param);
return $Self;
***************
*** 84,124 ****
# check if new ticket
! my $Tn = $Self->{TicketObject}->GetTNByString( $Param{GetParam}->{'Subject'} );
! if ( $Tn && $Self->{TicketObject}->TicketCheckNumber( Tn => $Tn ) ) {
! return 1;
! }
! else {
!
! # set attributes if ticket is created
! for ( keys %Set ) {
! $Param{GetParam}->{$_} = $Set{$_};
! $Self->{LogObject}->Log(
! Priority => 'notice',
! Message =>
! "Set param '$_' to '$Set{$_}' (Message-ID: $Param{GetParam}->{'Message-ID'}) ",
! );
! }
! # send bounce mail
! $Self->{EmailObject}->Send(
! To => $Param{GetParam}->{'From'},
! Subject => $Self->{ConfigObject}
! ->Get('PostMaster::PreFilterModule::NewTicketReject::Subject'),
! Body => $Self->{ConfigObject}
! ->Get('PostMaster::PreFilterModule::NewTicketReject::Body'),
! Charset => $Self->{ConfigObject}->Get('DefaultCharset'),
! Loop => 1,
! Attachment => [
! { Filename => "email.txt",
! Content => $Param{GetParam}->{'Body'},
! ContentType => "application/octet-stream",
! }
! ],
! );
$Self->{LogObject}->Log(
Priority => 'notice',
! Message => "Send reject mail to '$Param{GetParam}->{From}'!",
);
}
}
return 1;
--- 84,121 ----
# check if new ticket
! my $Tn = $Self->{TicketObject}->GetTNByString( $Param{GetParam}->{Subject} );
! return 1 if $Tn && $Self->{TicketObject}->TicketCheckNumber( Tn => $Tn );
! # set attributes if ticket is created
! for ( keys %Set ) {
! $Param{GetParam}->{$_} = $Set{$_};
$Self->{LogObject}->Log(
Priority => 'notice',
! Message =>
! "Set param '$_' to '$Set{$_}' (Message-ID: $Param{GetParam}->{'Message-ID'}) ",
);
}
+
+ # send bounce mail
+ $Self->{EmailObject}->Send(
+ To => $Param{GetParam}->{'From'},
+ Subject => $Self->{ConfigObject}
+ ->Get('PostMaster::PreFilterModule::NewTicketReject::Subject'),
+ Body => $Self->{ConfigObject}
+ ->Get('PostMaster::PreFilterModule::NewTicketReject::Body'),
+ Charset => $Self->{ConfigObject}->Get('DefaultCharset'),
+ Loop => 1,
+ Attachment => [
+ { Filename => "email.txt",
+ Content => $Param{GetParam}->{Body},
+ ContentType => "application/octet-stream",
+ }
+ ],
+ );
+ $Self->{LogObject}->Log(
+ Priority => 'notice',
+ Message => "Send reject mail to '$Param{GetParam}->{From}'!",
+ );
+
}
return 1;
More information about the cvs-log
mailing list