[SOLVED] OTRS is not creating tickets from some mailboxes

Moderator: crythias

Post Reply
iclaude
Znuny advanced
Posts: 108
Joined: 31 Mar 2016, 10:30
Znuny Version: OTRS 6.0.30
Real Name: Claude Chelene

[SOLVED] OTRS is not creating tickets from some mailboxes

Post by iclaude »

Greetings,

We are currently facing difficulties to create tickets using some mailboxes on our OTRS.

So far:
1. We have checked if all affected mailboxes on our Active Directory were not locked or with a expired password;
2. We logged on our webmail with all affected mailboxes credentials;
3. We did reset all passwords for the affected accounts on OTRS(AdminMailAccount);
4. On the communication logs we still get the error for the affected accounts as shown bellow:
Erros-Mailboxes.jpg
5. On the system logs were are getting these two types of messages:
Erros-Logs-20241127.jpg

Can someone help me diagnose and solve this problem?

Best Regards
You do not have the required permissions to view the files attached to this post.
Last edited by iclaude on 02 Dec 2024, 15:28, edited 1 time in total.
OTRS 6
paulfolkers
Znuny newbie
Posts: 38
Joined: 19 Jan 2024, 16:07
Znuny Version: 7.1.3
Real Name: Paul Folkers
Company: IT.WESER-EMS
Contact:

Re: OTRS is not creating tickets from some mailboxes

Post by paulfolkers »

Hi Claude,

I know these problems (even with correct credentials) from using the wrong authentication method.
From the error message you have sent, you are using SMTPS, are you using it for the other mailboxes, too?
You could also try to use the console command for fetching mails with verbose, it usually shows more information about errors.

Apart from that you could check if those mailboxes have SMTP(S) enabled? Are you using user-mailboxes or something else?

Overall it would help to have some more information on the error-prone mailboxes, i.e.:
- What is the diffrence between working and non-working mailboxes?
- Have they worked previously or are they newly configured?
- …

Even the smallest details could be a hint for us to solve this. ;-)
Usually, this should be something to discuss with a Znuny support partner, I‘d always suggest to have one on your side for all kinds of issues.

Best Regards from Germany!
Founder of IT.WESER-EMS (open source-focused IT-consulting) in Oldenburg, Northern Germany.
Dedicated to Znuny, GLPI and CheckMK 8)

Znuny consulting & development via IT.WESER-EMS
iclaude
Znuny advanced
Posts: 108
Joined: 31 Mar 2016, 10:30
Znuny Version: OTRS 6.0.30
Real Name: Claude Chelene

Re: OTRS is not creating tickets from some mailboxes

Post by iclaude »

Hi Paul Folkers,

Thank you for you response.

We could not run the verbose. When we tried we got the error bellow:

-
bash-4.2$ bin/otrs.Console.pl Maint::MailAccount::Fetch –verbose
Error: Could not find Kernel::System::Console::Command::Maint::MailAccount::Fetch.

OTRS::ITSM 6 (6.0.30)

Usage:
otrs.Console.pl command [options] [arguments]
We ran the following command: bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch and we have got the following results:

1. For an account without error:
webmail.bci.co.mz (IMAPS)...
IMAPS: Message 1/1 (op*******.pedidos@bci.co.mz/webmail.bci.co.mz)

IMAPS: Connection to webmail.bci.co.mz closed.

2. For an account with error:
webmail.bci.co.mz (IMAPS)...
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-0 Perl: 5.16.3 OS: linux Time: Thu Nov 28 11:50:48 2024

Message: CommunicationLog(ID:28001269,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:53778599)::Kernel::System::MailAccount::IMAP => IMAPS: Auth for user usi**-*************.pedidos@bci.co.mz/webmail.bci.co.mz failed!

Traceback (21987):
Module: Kernel::System::CommunicationLog::_LogError Line: 538
Module: Kernel::System::CommunicationLog::ObjectLog Line: 300
Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 209
Module: Kernel::System::MailAccount::IMAP::Fetch Line: 101
Module: Kernel::System::MailAccount::MailAccountFetch Line: 566
Module: (eval) Line: 172
Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 164
Module: (eval) Line: 460
Module: Kernel::System::Console::BaseCommand::Execute Line: 454
Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
Module: bin/otrs.Console.pl Line: 36
Q: What is the diffrence between working and non-working mailboxes?
A: They do not have differences in configuration as you can see bellow:

Working:
MB-Working.jpg
Not Working:
MB-NOT-Working.jpg

Q: Have they worked previously or are they newly configured?
A: They all worked previously. When we checked the pending mails using webmail we noticed that this problem started last week(November 21st).

Do you need anymore info?
What else can we check?

Best Regards
You do not have the required permissions to view the files attached to this post.
OTRS 6
paulfolkers
Znuny newbie
Posts: 38
Joined: 19 Jan 2024, 16:07
Znuny Version: 7.1.3
Real Name: Paul Folkers
Company: IT.WESER-EMS
Contact:

Re: OTRS is not creating tickets from some mailboxes

Post by paulfolkers »

I am a little confused, the first command code you've sent is simply a wrong command, you have used "Maint::MailAccount::Fetch" instead of "Maint::PostMaster::MailAccountFetch".

But I have also been wrong, the parameter is not verbose but "--debug".
Can you try to run the following and put the ID of one of the not working mailbox configurations? You get it from the browser URL when you open the mailbox configuration.

Code: Select all

sudo -u znuny /opt/znuny/bin/znuny.Console.pl Maint::PostMaster::MailAccountFetch --debug --mail-account-id 
Founder of IT.WESER-EMS (open source-focused IT-consulting) in Oldenburg, Northern Germany.
Dedicated to Znuny, GLPI and CheckMK 8)

Znuny consulting & development via IT.WESER-EMS
iclaude
Znuny advanced
Posts: 108
Joined: 31 Mar 2016, 10:30
Znuny Version: OTRS 6.0.30
Real Name: Claude Chelene

Re: OTRS is not creating tickets from some mailboxes

Post by iclaude »

Hi Paul Folkers,

Thanks for your response and for correcting my mistake.

I have ran the debbug command and here are the results:

1. For the working account:

Spawning child process to fetch incoming messages from mail accounts...

webmail.bci.co.mz (IMAPS)...
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to webmail.bci.co.mz:993
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
[...System/MailAccount/IMAPS.pm line 40 in sub new] waiting for socket ready
[...System/MailAccount/IMAPS.pm line 40 in sub new] looking for greeting
[...System/MailAccount/IMAPS.pm line 40 in sub new] got a greeting: * OK The Microsoft Exchange IMAP4 service is ready.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 0 LOGIN o********.pedidos@bci.co.mz "**********************"\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 265 in sub _process_cmd] 0 OK LOGIN completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 0 OK LOGIN completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 1 SELECT "INBOX"\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * 0 RECENT\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * 0 RECENT\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * OK [UIDVALIDITY 14] UIDVALIDITY value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * OK [UIDVALIDITY 14] UIDVALIDITY value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * OK [UIDNEXT 12632] The next unique identifier value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * OK [UIDNEXT 12632] The next unique identifier value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] 1 OK [READ-WRITE] SELECT completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 1 OK [READ-WRITE] SELECT completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 2 SELECT "INBOX"\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * 0 RECENT\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * 0 RECENT\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * OK [UIDVALIDITY 14] UIDVALIDITY value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * OK [UIDVALIDITY 14] UIDVALIDITY value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] * OK [UIDNEXT 12632] The next unique identifier value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * OK [UIDNEXT 12632] The next unique identifier value\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 413 in sub _process_cmd] 2 OK [READ-WRITE] SELECT completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 2 OK [READ-WRITE] SELECT completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 3 EXPUNGE\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1070 in sub _process_cmd] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1070 in sub _process_cmd] 3 OK EXPUNGE completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 3 OK EXPUNGE completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 879 in sub _send_cmd] 4 EXPUNGE\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 5 LOGOUT\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * 0 EXISTS\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] 4 OK EXPUNGE completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 4 OK EXPUNGE completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1197 in sub _seterrstr] warning unknown return string (id=5): 4 OK EXPUNGE completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] * BYE Microsoft Exchange Server 2016 IMAP4 server signing off.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * BYE Microsoft Exchange Server 2016 IMAP4 server signing off.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] 5 OK LOGOUT completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 5 OK LOGOUT completed.\r\n
IMAPS: Connection to webmail.bci.co.mz closed.

Done.

2. Non working account:

Spawning child process to fetch incoming messages from mail accounts...

webmail.bci.co.mz (IMAPS)...
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to webmail.bci.co.mz:993
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
[...System/MailAccount/IMAPS.pm line 40 in sub new] waiting for socket ready
[...System/MailAccount/IMAPS.pm line 40 in sub new] looking for greeting
[...System/MailAccount/IMAPS.pm line 40 in sub new] got a greeting: * OK The Microsoft Exchange IMAP4 service is ready.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 0 LOGIN ***.helpdesk@bci.co.mz "**************"\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 265 in sub _process_cmd] 0 NO Server Unavailable. 15\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 0 NO Server Unavailable. 15\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1191 in sub _seterrstr] Server Unavailable. 15\r
[...cpan-lib/Net/IMAP/Simple.pm line 879 in sub _send_cmd] 1 EXPUNGE\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 2 LOGOUT\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] 1 BAD Command received in Invalid state.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 1 BAD Command received in Invalid state.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1197 in sub _seterrstr] warning unknown return string (id=2): 1 BAD Command received in Invalid state.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] * BYE Microsoft Exchange Server 2016 IMAP4 server signing of f.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * BYE Microsoft Exchange Server 2016 IMAP4 server signing off.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] 2 OK LOGOUT completed.\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 2 OK LOGOUT completed.\r\n
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-0 Perl: 5.16.3 OS: linux Time: Fri Nov 29 11:49:30 2024

Message: CommunicationLog(ID:28031445,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:53838435)::Kernel::System::MailAccount::IMAP => IMAPS: Auth for user ***.helpdesk@bci.co.mz/webmail.bci.co.mz failed!

Traceback (23768):
Module: Kernel::System::CommunicationLog::_LogError Line: 538
Module: Kernel::System::CommunicationLog::ObjectLog Line: 300
Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 209
Module: Kernel::System::MailAccount::IMAP::Fetch Line: 101
Module: Kernel::System::MailAccount::MailAccountFetch Line: 566
Module: (eval) Line: 172
Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 164
Module: (eval) Line: 460
Module: Kernel::System::Console::BaseCommand::Execute Line: 454
Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
Module: ./bin/otrs.Console.pl Line: 36

Done.

Best Regards
OTRS 6
paulfolkers
Znuny newbie
Posts: 38
Joined: 19 Jan 2024, 16:07
Znuny Version: 7.1.3
Real Name: Paul Folkers
Company: IT.WESER-EMS
Contact:

Re: OTRS is not creating tickets from some mailboxes

Post by paulfolkers »

Hi Claude,

the difference to the working mailbox is right after the login:

Code: Select all

[...cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 0 LOGIN ***.helpdesk@bci.co.mz "**************"\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 265 in sub _process_cmd] 0 NO Server Unavailable. 15\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 0 NO Server Unavailable. 15\r\n
[...cpan-lib/Net/IMAP/Simple.pm line 1191 in sub _seterrstr] Server Unavailable. 15\r
If you search the www for

Code: Select all

NO Server Unavailable. 15
you will find a lot of hints, that this is an Exchange problem.
I'm afraid you won't be able to fix this from Znuny side, please check the health status of the Exchange mailboxes.
Unfortunately, I'm no expert in Exchange, so I'm not able to help you on this.

BR, Paul
Founder of IT.WESER-EMS (open source-focused IT-consulting) in Oldenburg, Northern Germany.
Dedicated to Znuny, GLPI and CheckMK 8)

Znuny consulting & development via IT.WESER-EMS
iclaude
Znuny advanced
Posts: 108
Joined: 31 Mar 2016, 10:30
Znuny Version: OTRS 6.0.30
Real Name: Claude Chelene

Re: OTRS is not creating tickets from some mailboxes

Post by iclaude »

Hi Paul,

Thank you for your response.

The problem was solved by our Exchange team.
There was a problem with IMAP Proxy on one of the servers.

When I get more details the solution about it I will update the thread.

Thanks again.

Best Regards
OTRS 6
paulfolkers
Znuny newbie
Posts: 38
Joined: 19 Jan 2024, 16:07
Znuny Version: 7.1.3
Real Name: Paul Folkers
Company: IT.WESER-EMS
Contact:

Re: [SOLVED] OTRS is not creating tickets from some mailboxes

Post by paulfolkers »

Hi,

thanks for your update - glad, it‘s working fine now. :)
Founder of IT.WESER-EMS (open source-focused IT-consulting) in Oldenburg, Northern Germany.
Dedicated to Znuny, GLPI and CheckMK 8)

Znuny consulting & development via IT.WESER-EMS
Post Reply