Geht im Standard so erstmal nicht (Edit: Man kann nur die Liste der zu durchsuchenden Header verändern. Von dieser Liste nimmt OTRS alle Felder mit "X-OTRS-" für die Liste der zu setzenden Header). Mit einem kleinen PostMaster-Filter ist das aber möglich:
Code: Select all
# --
# Kernel/System/PostMaster/Filter/SetReplyToFromBody.pm - sub part of PostMaster.pm
# Copyright (C) 2012 Perl-Services.de
# --
# $Id: SetReplyToFromBody.pm,v 1.20 2012/11/20 15:52:12 mh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
package Kernel::System::PostMaster::Filter::SetReplyToFromBody;
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = qw($Revision: 1.20 $) [1];
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
$Self->{Debug} = $Param{Debug} || 0;
# get needed objects
for (qw(ConfigObject LogObject DBObject MainObject)) {
$Self->{$_} = $Param{$_} || die "Got no $_!";
}
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
# check needed stuff
for (qw(JobConfig GetParam)) {
if ( !$Param{$_} ) {
$Self->{LogObject}->Log( Priority => 'error', Message => "Need $_!" );
return;
}
}
# ignore mail if subject is empty
my ($ReplyTo) = $GetParam{Body} =~ m{On behalf of ([^\s]+)};
if ( $ReplyTo ) {
$Param{GetParam}->{'ReplyTo'} = $ReplyTo;
}
return 1;
}
1;
Und in der Config.pm
Code: Select all
$Self->{'PostMaster::PreFilterModule'}->{'0003-SetReplyToFromBody'} = {
Module => 'Kernel::System::PostMaster::Filter::SetReplyToFromBody',
};
Den Regulären Ausdruck um die Adresse im Body zu finden musst Du natürlich anpassen...
Code ist ungetestet.