[SOLVED] OTRS is *NOT* deleting mails

Moderator: crythias

Locked
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

[SOLVED] OTRS is *NOT* deleting mails

Post by EXG133 »

OK, I know most topics about this are because people expect IMAP to keep all mails in the original mailbox.
Just to be clear: I've created a seperate mail account and I want OTRS to delete all mails.

Yesterday was a public holiday so this morning I check my fresh OTRS installation and I see 40 tickets created, all for the same mail. I check the otrs.log and find tons of these:

[Mon Aug 13 14:10:01 2012][Notice][Kernel::System::Ticket::TicketCreate] New Ticket [2012081310000072/Test mail 20120] created (TicketID=15,Queue=PCC ICT,Priority=3 normal,State=new)
[Mon Aug 13 14:20:01 2012][Notice][Kernel::System::PID::PIDCreate] Can't create PID PostMasterMailbox, because it's already running (*deletedforprivacy*)!

It continues for an hour then this:

[Mon Aug 13 15:00:01 2012][Notice][Kernel::System::PID::PIDCreate] Can't create PID PostMasterMailbox, because it's already running (*deletedforprivacy*)!
[Mon Aug 13 15:10:01 2012][Notice][Kernel::System::PID::PIDCreate] Removed PID (PostMasterMailbox/*deletedforprivacy*, because 1 hour old!
[Mon Aug 13 16:00:02 2012][Notice][Kernel::System::Ticket::TicketCreate] New Ticket [2012081310000081/*deletedforprivacy*] created (TicketID=16,Queue=PCC ICT,Priority=3 normal,State=new)
[Mon Aug 13 16:10:01 2012][Notice][Kernel::System::PID::PIDCreate] Can't create PID PostMasterMailbox, because it's already running (*deletedforprivacy*)!

So I've tried several solutions found on the forum / mailgroups: Put the ID for the PostMasterMailbox on 2 instead of 1 , cleared the DB table. After this it runs again successfully once and then it repeats the error above.

I decide to check the mailbox (Exchange based). When the postmastermailbox runs it seems to read the mail, create the ticket and then.. nothing. It doesn't delete the email and I suspect the process hangs.

I did change the timing of the cronjob from 10 minutes to 2. I changed it back to 10 but that didn't fix it.

When I try a manual "fetch mail" Apache seems to crash.. (maybe the frontend waits for a script termination?).

Anyone has an idea?
Last edited by EXG133 on 17 Aug 2012, 12:44, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS is *NOT* deleting mails

Post by jojo »

it seems that a malformed mail crashes the postmaster. so check manually in mailbox and delete this mail
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: OTRS is *NOT* deleting mails

Post by EXG133 »

Sorry, I forgot to mention that I tried deleting the first mail that had this issue and it's the same for all mails.

I tried sending a plaintext email just to be sure but same symptoms: ticket is created, mail is set to 'read' but not deleted and afterwards the postmastermailbox hangs.

EDIT: I tried to run "perl otrs.postmastermailbox.pl"


D:\Apps\OTRS\OTRS\bin>perl otrs.PostMasterMailbox.pl -f 1
NOTICE: PostMasterMailbox.pl is already running but is starting again!
IMAP: Message 1/1 (*privacy*)
Couldn't send mail: 550 5.7.1 Client does not have permissions to send as this s
ender
at D:/Apps/OTRS/OTRS/Kernel/System/Email/SMTPTLS.pm line 172

So I tried sending a mail from a ticket to a colleague and that works.

EDIT2: I tried perl -d otrs.postmastermailbox.pl but that output just confused me :oops:

EDIT3: I fixed it I think! After carefully reading the result of the debugging I noticed the following line:

Kernel::System::Email::Send('Kernel::System::Email=HASH(0x32fcbfc)', 'Fr
om', 'OTRS Notification Master <otrs@***the hostname of OTRS****>', 'To', '***', 'Subject', '[Ticket#2012081710000074] New ticket notification! (Plain tex...', 'MimeType', 'text/html', ...) called at D:/Apps/OTRS/OTRS/Kernel/Syst

What happened: I configured an AutoResponse on my queue. However, I left NotificationSenderEmail to the default otrs@<OTRS_CONFIG_FQDN> which obviously doesn't work. I just configured my main address and voila, seems to be fixed. IMO very weird that that causes such a crash of the postmastermailbox.pl but I'm glad I found it :)
Locked