Hi Experts
Currently we are configuring the postmaster email to receive emails by pop3 from our exchange mailbox.
At this point, the emails are being fetched and integrated into tickets registered in OTRS, but all the emails fetched are deleted from the mailbox.
Is there any solution to keep the emails in the inbox and only delete those that are integrated into tickets in OTRS? We have already set a few filters for emails, and we want to keep "rejected emails", untouched in our mailbox, so that they can be treated outside OTRS.
Any Hint?
All the help is highly appreciated!
Thanks in advance
Best Regards
Luis
POP3 leave emails untouched in exchange, if reject by OTRS as Tickets
Moderator: crythias
Re: POP3 leave emails untouched in exchange, if reject by OTRS as Tickets
Hi,
no chance. You need to do the copy the mails you want to keep on your exchange server in a different mailbox.
Flo
no chance. You need to do the copy the mails you want to keep on your exchange server in a different mailbox.
Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12
-- Ich beantworte keine Forums-Fragen PN - No PN please
I won't answer to unfriendly users any more. A greeting and regards are just polite.
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12
-- Ich beantworte keine Forums-Fragen PN - No PN please
I won't answer to unfriendly users any more. A greeting and regards are just polite.
-
- Znuny newbie
- Posts: 5
- Joined: 04 Feb 2016, 19:07
- Znuny Version: 5.0.6
- Real Name: Luis Lúcio
- Company: NA
Re: POP3 leave emails untouched in exchange, if reject by OTRS as Tickets
Hi all,
I've done this, with sucess.
‘cd /opt/OTRS/Kernel/System/MailAccount’
On file POP3.pm
On fecth function we have altered the bold section
"
...
else {
my $PostMasterObject = Kernel::System::PostMaster->new(
%{$Self},
Email => $Lines,
Trusted => $Param{Trusted} || 0,
Debug => $Debug,
);
my @Return = $PostMasterObject->Run( QueueID => $Param{QueueID} || 0 );
if ( !$Return[0] ) {
my $File = $Self->_ProcessFailed( Email => $Lines );
$Kernel::OM->Get('Kernel::System::Log')->Log(
Priority => 'error',
Message => "$AuthType: Can't process mail, mail saved ("
. "$File, report it on http://bugs.otrs.org/)!",
);
} #New section - start
else {
if ( $Return[0] < 5 ) {
$PopObject->delete($Messageno);
}
}
#New Section - end
undef $PostMasterObject;
}
#Commented the line - Start
# mark email to delete if it got processed
#$PopObject->delete($Messageno);
#Commented the line - End
# check limit
$Self->{Limit}++;
if ( $Self->{Limit} >= $Limit ) {
$Self->{Reconnect} = 0;
last MESSAGE_NO;
}
...
I've done this, with sucess.
‘cd /opt/OTRS/Kernel/System/MailAccount’
On file POP3.pm
On fecth function we have altered the bold section
"
...
else {
my $PostMasterObject = Kernel::System::PostMaster->new(
%{$Self},
Email => $Lines,
Trusted => $Param{Trusted} || 0,
Debug => $Debug,
);
my @Return = $PostMasterObject->Run( QueueID => $Param{QueueID} || 0 );
if ( !$Return[0] ) {
my $File = $Self->_ProcessFailed( Email => $Lines );
$Kernel::OM->Get('Kernel::System::Log')->Log(
Priority => 'error',
Message => "$AuthType: Can't process mail, mail saved ("
. "$File, report it on http://bugs.otrs.org/)!",
);
} #New section - start
else {
if ( $Return[0] < 5 ) {
$PopObject->delete($Messageno);
}
}
#New Section - end
undef $PostMasterObject;
}
#Commented the line - Start
# mark email to delete if it got processed
#$PopObject->delete($Messageno);
#Commented the line - End
# check limit
$Self->{Limit}++;
if ( $Self->{Limit} >= $Limit ) {
$Self->{Reconnect} = 0;
last MESSAGE_NO;
}
...