Constant error in MailQueue - Error: Message sending already in progress! Skipping...

Stop Cron.sh and Daemon.pl

  • cd /opt/otrs/bin
    sudo -c "./Cron.sh stop" -s /bin/bash otrs
    sudo -c "./otrs.Daemon stop" -s /bin/bash otrs

Then edit the module

CODE: SELECT ALL

sudo nano /opt/otrs/Kernel/System/Console/Command/Maint/Email/MailQueue.pm

Searched for the string Message sending already in progress! Skipping and just before the "if (%PID)... "line preceding it and add the code to force delete the PID (Process ID).

CODE: SELECT ALL

...
my %PID = $PIDObject->PIDGet(
 Name => 'MaintMailQueueSending',
 );
 ## This is new...
 my $ForceDeletePIDOnce = $PIDObject->PIDDelete(
 Name => 'MaintMailQueueSending',
 Force => 1,
 );
 # ... up to here
 if (%PID) {
 die "Message sending already in progress! Skipping...\n";
 }
 ...

Saved and ran it

CODE: SELECT ALL

su -c "./otrs.Console.pl Maint::Email::MailQueue --send --verbose" -s /bin/bash otrs

It gave the error message anyway but the process was deleted.
Finally edited /opt/otrs/Kernel/System/Console/Command/Maint/Email/MailQueue.pm again and removed the lines I just added.
Saved, reboot.... and it seems to be working.

https://community.znuny.org/viewtopic.php?f=62&t=39530

You cannot comment on this entry