[Solved] - Troubleshooting Ticket event notifications for Agents - OTRS v6.0.19

Moderator: crythias

Post Reply
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

[Solved] - Troubleshooting Ticket event notifications for Agents - OTRS v6.0.19

Post by fpleon »

Hi. The server is Debian GNU/Linux stretch v9.9 server running MariaDB, exim4, apache2 and OTRS v6.0.19 .

I've been scratching my mind for a while because none of the registered agents (not too many, since I am the only one) receive any ticket notifications. Notifications aren't even delivered to otrs e-mail queue. Agents can send e-mail messages using the "Create Administrative Message" menu and every time they answer a ticket (the "Customer" receives the message via e-mail).

So far, I have had:
  1. Checked the agent's/user's personal preferences and registered queues
  2. Made a check-list of the system configuration parameters
  3. Created many Ticket notification rules (none of them notifies agents)
  4. Checked the database with otrs tools and mysqlcheck (DB seems fine)
  5. Created and successfully sent Administrative message
  6. Successfully sent an e-mail using telnet through listening exim4 on 25 (SMTP works well
  7. Successfully replied to a ticket (AgentTicketCompose) and the client received an e-mail with the ticket's reply
  8. Checked that otrs mail queue isn't filled with unprocessed tasks
  9. Checked new e-mails to clients in otrs's mail queue
  10. Looked for errors in the Admin communication log
  11. Checked System information and added it to this report
  12. Kept reading trying and documenting, but without success
I am trying hard to make this feature work, but I might be foreseeing something. If we solve this issue, I promise to post the follow-up. If we don't nail it this time, at least I hope that this post will show some tools which may help someone else to troubleshoot similar issues.

Thank you the opportunity to enjoy this useful software and thank you in advance for your help.
Kindest regards.

Code: Select all

= 1. User's Personal Preferences check =
Went to Personal Preferences --> Notification Settings"
 My Queues (all the queues selected)
 Ticket notification (all boxes checked)
 Appointment notification (all boxes checked)

= 2. System Configuration check =
Admin --> System Configuration --> Import&Export --> Export current Configuration --> Export_Current_System_Configuration.yml
  SendmailModule:
	EffectiveValue: Kernel::System::Email::SMTP

  SendmailModule::Host:
	EffectiveValue: localhost

  SendmailNotificationEnvelopeFrom:
	EffectiveValue: soporte@ofuscated.com.ar

  FQDN:
	EffectiveValue: soporte.ofuscated.com.ar

Default options (not modified, therefore, not exported)
 * CheckEmailValidAddress = ^(root@localhost|admin@localhost)$
 * CheckEmailInvalidAddress = @(example)\.(..|...)$

= 3. New generic Ticket Notification (events) creation =
Admin --> Ticket Notification Management --> Add notification
 Edit Notification
  Name: Testing_Agent_Notification
  Show in agent preferences: Yes
  Validity: valid
 Events: TicketCreate TicketDelete TicketTitleUpdate TicketUnlockTimeoutUpdate
		 TicketQueueUpdate TicketTypeUpdate TicketServiceUpdate TicketSLAUpdate
		 TicketCustomerUpdate TicketPendingTimeUpdate TicketLockUpdate
		 TicketArchiveFlagUpdate TicketLockUpdate TicketArchiveFlagUpdate
		 TicketStateUpdate TicketOwnerUpdate TicketResponsibleUpdate
		 TicketPriorityUpdate
 Ticket Filter:
  Queue: Default Hard Hosting Junk Misc Postmaster Projectos delete
	(Also made tests with with Queue filter empty)
 Recipients:
  Send To: Agent who owns the ticket
		   All agents subscribed to the ticket's queue
		   All agents subscribed to the ticket's service
  Send on out of office: [x] Also send if the user is currently out of office
 Notification Methods
  Email
  Enable this notification method: [x]
  Active by default in agent preferences: [x]
  Email template: Default (also tried unsuccessfully with Altert and Unformatted)
 Notification Text
  English (United States)
	Subject: This is a simple test example
	Text: Simple is to configure it, harder is to make it work.

The Agent's selected language is the same, English (United States).

Notification rule exported into txt file
---
- ChangeBy: 2
  ChangeTime: 2019-07-06 18:14:32
  Comment: Testing_Agent_Notification
  CreateBy: 2
  CreateTime: 2019-07-06 18:02:39
  Data:
	AgentEnabledByDefault:
	- Email
	ArticleAttachmentInclude:
	- '0'
	Events:
	- TicketArchiveFlagUpdate
	- TicketCreate
	- TicketCustomerUpdate
	- TicketDelete
	- TicketLockUpdate
	- TicketOwnerUpdate
	- TicketPendingTimeUpdate
	- TicketPriorityUpdate
	- TicketQueueUpdate
	- TicketResponsibleUpdate
	- TicketServiceUpdate
	- TicketSLAUpdate
	- TicketStateUpdate
	- TicketTitleUpdate
	- TicketTypeUpdate
	- TicketUnlockTimeoutUpdate
	LanguageID:
	- en
	QueueID:
	- '1'
	- '2'
	- '3'
	- '4'
	- '5'
	- '6'
	- '7'
	- '8'
	Recipients:
	- AgentMyQueues
	- AgentMyServices
	SendOnOutOfOffice:
	- '1'
	TransportEmailTemplate:
	- Default
	Transports:
	- Email
	VisibleForAgent:
	- '1'
  ID: 31
  Message:
	en:
	  Body: Simple is to configure it, harder is to make it work
	  ContentType: text/plain
	  Subject: This is a simple test example
  Name: Testing_Agent_Notification
  ValidID: 1

Code: Select all

= 4. Database check ok =
~$ su -c "/opt/otrs/bin/otrs.Console.pl Maint::Database::Check --repair" -s /bin/bash otrs
Trying to connect to database 'DBI:mysql:database=otrs;host=127.0.0.1' with user 'otrs'...
Connection successful.
~$ mysqlcheck -o --all-databases
[...]
status: OK (for all the databases).

= 5. Create Administrative Message =
From: soporte@ofuscated.com.ar
Send message to users: (selected the user with the address info@ofuscated.com.ar)
Subject: Test1
Body: Test1
The message is correctly processed and delivered.
==> /var/log/exim4/mainlog <==
2019-07-07 06:01:19 1hk32t-0000If-JQ <= soporte@ofuscated.com.ar H=localhost (soporte.ofuscated.com.ar) [127.0.0.1] P=esmtp S=641 id=1562489932.11170.7225290658@soporte.ofuscated.com.ar
2019-07-07 06:01:23 1hk32t-0000If-JQ => info@ofuscated.com.ar R=smarthost T=remote_smtp_smarthost H=mail.ofuscated.com.ar [208.76.243.50] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,OU=PositiveSSL,CN=s307.c4.mailrelay2p.com" A=plain C="250 OK id=1hk32x-0007BA-4L"
2019-07-07 06:01:23 1hk32t-0000If-JQ Completed

= 6. Localhost exim4 mail server working fine =
# ~$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 srv3.ofuscated.com.ar ESMTP Exim 4.89 Sat, 06 Jul 2019 17:48:34 -0300
EHLO mail.ofuscated.com.ar
250-srv3.ofuscated.com.ar Hello localhost [127.0.0.1]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PRDR
250 HELP
MAIL FROM:<soporte@ofuscated.com.ar>
250 OK
RCPT TO:info@ofuscated.com.ar
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
Test message 3 from support.
.
250 OK id=1hjrc8-0001GR-Ks
quit
221 srv3.ofuscated.com.ar closing connection
Connection closed by foreign host.

This new enqueued mesage can be followed in exim4's activity logs
tail -f /var/log/exim4/mainlog /var/log/user.log /var/log/otrs/*
/var/log/exim4/mainlog <==
2019-07-06 17:49:09 1hjrc8-0001GR-Ks <= soporte@ofuscated.com.ar H=localhost (mail.ofuscated.com.ar) [127.0.0.1] P=esmtp S=393
2019-07-06 17:49:11 1hjrc8-0001GR-Ks => info@ofuscated.com.ar R=smarthost T=remote_smtp_smarthost H=mail.ofuscated.com.ar [208.76.243.50] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,OU=PositiveSSL,CN=s307.c4.mailrelay2p.com" A=plain C="250 OK id=1hjrcN-0001Zf-Eq"
2019-07-06 17:49:11 1hjrc8-0001GR-Ks Completed
And message is aftwerwards received in the destination address (info@ofuscated.com.ar)

= 7. Message sent from AgentTicketCompose =
tail -f /var/log/exim4/mainlog /var/log/user.log /var/log/otrs/*
/var/log/exim4/mainlog <==
2019-07-06 15:09:01 1hjp7M-0000TL-W5 <= soporte@ofuscated.com.ar H=localhost (soporte.ofuscated.com.ar) [127.0.0.1] P=esmtp S=1058 id=1562436525.481853.552637609@soporte.ofuscated.com.ar
2019-07-06 15:09:03 1hjp7M-0000TL-W5 => customer@cusofuscated.com.ar R=smarthost T=remote_smtp_smarthost H=mail.ofuscated.com.ar [208.76.243.50] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,OU=PositiveSSL,CN=s307.c4.mailrelay2p.com" A=plain C="250 OK id=1hjp7O-00051U-Oe"
2019-07-06 15:09:03 1hjp7M-0000TL-W5 Completed

= 8. OTRS mail queue status =
~$ su -c "/opt/otrs/bin/otrs.Console.pl Maint::Email::MailQueue --list" -s /bin/bash otrs
Mail queue is empty.
Done.

= 9. OTRS mail queue after replying to the customer's ticket =
~$ su -c "/opt/otrs/bin/otrs.Console.pl Maint::Email::MailQueue --list" -s /bin/bash otrs
  +----+-----------+----------+--------------------------+--------------+----------+----------------+-------------------+
  | ID | ArticleID | Attempts | Sender                   | Recipient    | Due Time | Last SMTP Code | Last SMTP Message |
  +----+-----------+----------+--------------------------+--------------+----------+----------------+-------------------+
  | 4  | 116259    | 0        | soporte@ofuscated.com.ar | customer@cusofuscated.com.ar | -        | -              | -                 |
  +----+-----------+----------+--------------------------+--------------+----------+----------------+-------------------+


= 10. Admin --> Communication Log =
Communication Log Overview (2)
Connection 		SMTP 	07/06/2019 16:50:14 	07/06/2019 16:50:14 	0 s
 1 		Kernel::System::Email::SMTP 	Testing connection to SMTP service (3 attempts max.). 	07/06/2019 16:50:14
2 		Kernel::System::Email::SMTP 	1: Trying to connect to 'localhost' on soporte.ofuscated.com.ar with SMTP type 'SMTP'. 	07/06/2019 16:50:14

Message 		SMTP 	07/06/2019 16:49:23 	07/06/2019 16:50:14 	51 s 
 Communication Log Details (13)
1 		Kernel::System::Email 	Building message for delivery. 	07/06/2019 16:49:23
2 		Kernel::System::Email 	Queuing message for delivery. 	07/06/2019 16:49:23
3 		Kernel::System::MailQueue 	Serializing and saving message (ArticleID: 116259, Sender: soporte@ofuscated.com.ar, Recipient: customer@cusofuscated.com.ar, MessageID: <1562442563.126628.703838349@soporte.ofuscated.com.ar>) 	07/06/2019 16:49:23
4 		Kernel::System::MailQueue 	Successfully stored message for sending. 	07/06/2019 16:49:23
5 		Kernel::System::Email 	Successfully queued message for delivery (MessageID: <1562442563.126628.703838349@soporte.ofuscated.com.ar>, To: 'customer@cusofuscated.com.ar', From: 'soporte@ofuscated.com.ar', Subject: 'Re: [Ticket#2019070610000182] Test 30'). 	07/06/2019 16:49:23
6 		Kernel::System::MailQueue 	Sending queued message with id '4'. 	07/06/2019 16:50:14
7 		Kernel::System::Email 	Trying to send the email using backend 'Kernel::System::Email::SMTP'. 	07/06/2019 16:50:14
8 		Kernel::System::Email::SMTP 	Received message for sending, validating message contents. 	07/06/2019 16:50:14
9 		Kernel::System::Email::SMTP 	Sending envelope from (mail from: soporte@ofuscated.com.ar) to server. 	07/06/2019 16:50:14
10 		Kernel::System::Email::SMTP 	Sending envelope to (rcpt to: customer@cusofuscated.com.ar) to server. 	07/06/2019 16:50:14
11 		Kernel::System::Email::SMTP 	Sending message data to server. 	07/06/2019 16:50:14
12 		Kernel::System::Email::SMTP 	Email successfully sent from 'soporte@ofuscated.com.ar' to 'customer@cusofuscated.com.ar'. 	07/06/2019 16:50:14
13 		Kernel::System::MailQueue 	Message successfuly sent! 	07/06/2019 16:50:14 

Code: Select all

= 11. System information =
OTRS v6.0.19
Distribution (debian 9.9)
Information Kernel Version (Linux srv3 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux)
Information System Load (0.02)
Perl Version (5.24.1 (linux)
Free Swap Space (%) (100)
Used Swap Space (MB) (0) 
Perl Modules 
  o Apache::DBI......................ok (v1.12)
  o Apache2::Reload..................ok (v0.13)
  o Archive::Tar.....................ok (v2.04_01)
  o Archive::Zip.....................ok (v1.59)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.73_04)
  o Date::Format.....................ok (v2.24)
  o DateTime.........................ok (v1.42)
  o DBI..............................ok (v1.636)
  o DBD::mysql.......................ok (v4.041)
  o DBD::ODBC........................Not installed! (optional  - Required to connect to a MS-SQL database.)
  o DBD::Oracle......................Not installed! (optional  - Required to connect to a Oracle database.)
  o DBD::Pg..........................Not installed! (optional  - Required to connect to a PostgreSQL database.)
  o Digest::SHA......................ok (v5.95_01)
  o Encode::HanExtra.................ok (v0.23)
  o IO::Socket::SSL..................ok (v2.044)
  o JSON::XS.........................ok (v3.03)
  o List::Util::XS...................ok (v1.47)
  o LWP::UserAgent...................ok (v6.26)
  o Mail::IMAPClient.................ok (v3.38)
	o IO::Socket::SSL................ok (v2.044)
	o Authen::SASL...................ok (v2.16)
	o Authen::NTLM...................ok (v1.09)
  o ModPerl::Util....................ok (v2.000010)
  o Net::DNS.........................ok (v1.07)
  o Net::LDAP........................ok (v0.65)
  o Template.........................ok (v2.24)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.26)
  o Time::HiRes......................ok (v1.9733)
  o XML::LibXML......................ok (v2.0128)
  o XML::LibXSLT.....................ok (v1.95)
  o XML::Parser......................ok (v2.44)
  o YAML::XS.........................ok (v0.63)

Bundled modules:

  o Algorithm::Diff..................ok (v1.1903)
  o Apache::DBI......................ok (v1.12)
  o CGI..............................ok (v4.36)
  o CSS::Minifier....................ok (v0.01)
  o Class::Inspector.................ok (v1.31)
  o Crypt::PasswdMD5.................ok (v1.40)
  o Email::Valid.....................ok (v1.202)
  o Encode::Locale...................ok (v1.05)
  o IO::Interactive..................ok (v1.022)
  o JSON.............................ok (v2.94)
  o JSON::PP.........................ok (v2.27203)
  o JavaScript::Minifier.............ok (v1.14)
  o LWP..............................ok (v6.26)
  o Linux::Distribution..............ok (v0.23)
  o Locale::Codes....................ok (v3.52)
  o MIME::Tools......................ok (v5.509)
  o Mail::Address....................ok (v2.18)
  o Mail::Internet...................ok (v2.18)
  o Module::Refresh..................ok (v0.17)
  o Mozilla::CA......................ok (v20180117)
  o Net::HTTP........................ok (v6.17)
  o Net::IMAP::Simple................ok (v1.2209)
  o Net::SSLGlue.....................ok (v1.058)
  o PDF::API2........................ok (v2.033)
  o SOAP::Lite.......................ok (v1.20)
  o Sys::Hostname::Long..............ok (v1.5)
  o Text::CSV........................ok (v1.95)
  o Text::Diff.......................ok (v1.44)
  o URI..............................ok (v1.71)
  o YAML.............................ok (v1.23)
  o parent...........................ok (v0.236)
 
= 12. Related publications I've already read =
  1. viewtopic.php?t=40268
  2. viewtopic.php?t=9573
  3. https://doc.otrs.com/doc/manual/admin/6 ... ifications
  4. https://doc.otrs.com/doc/manual/admin/6 ... index.html
  5. viewtopic.php?t=32734
  6. https://lists.otrs.org/pipermail/otrs/2 ... 31420.html
  7. https://hooktube.com/watch?v=k7ik__gcDnc
= Images =
UserQueues.png
TicketNotification1.png
TicketNotification2.png
You do not have the required permissions to view the files attached to this post.
Last edited by fpleon on 09 Jul 2019, 12:49, edited 4 times in total.
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

Re: [Unsolved] - Troubleshooting Ticket notifications OTRS v6.0.19

Post by fpleon »

TicketNotification3.png
You do not have the required permissions to view the files attached to this post.
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [Unsolved] - Troubleshooting Ticket notifications OTRS v6.0.19

Post by root »

Hi,

What's your setting fort the system configuration SendmailNotificationEnvelopeFrom::FallbackToEmailFrom? Did you tried to enable this?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

Re: [Unsolved] - Troubleshooting Ticket notifications OTRS v6.0.19

Post by fpleon »

Hi, Roy. Thank you for your fast answer.
The System Configuration parameter SendmailNotificationEnvelopeFrom::FallbackToEmailFrom was disabled. I enabled it[14] it and tried again by creating a new ticket in the default queue. I wasn't able to find traces of notifications in MailQueue[15] nor exim[16] nor Communication Log[17].

Thank you anyway for your suggestion. It didn't occurred to me before because I hadn't any previous issues with the e-mail server (exim4). It didn't improve the scenario but at least it didn't make it worse. E-mail from AgentTicketCompose and AdminNotification work well as previously reported.

Code: Select all

[14]
  SendmailNotificationEnvelopeFrom::FallbackToEmailFrom:
    ChangeBy: 2
    ChangeTime: 2019-07-07 08:00:13
    CreateBy: 2
    CreateTime: 2019-07-06 05:13:35
    DefaultID: 1097
    EffectiveValue: '1'
    IsDirty: 0
    IsValid: 1
    ModifiedID: 46
    Name: SendmailNotificationEnvelopeFrom::FallbackToEmailFrom
    ResetToDefault: 0
    SettingUID: Modified4620190707080013
    TargetUserID: ~
    UserModificationActive: 0

[15] root@srv3:~$ su -c "/opt/otrs/bin/otrs.Console.pl Maint::Email::MailQueue --list" -s /bin/bash otrs
Mail queue is empty.
Done.

[16] ~$ tail -f /var/log/exim4/mainlog 
2019-07-07 07:57:14 exim 4.89 daemon started: pid=1027, -q30m, listening for SMTP on [127.0.0.1]:25
2019-07-07 07:57:14 Start queue run: pid=1029
2019-07-07 07:57:14 End queue run: pid=1029

[17] 
  No account problems
  No communication problems
  No active communications
  Average processing time 30 seconds
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [Unsolved] - Troubleshooting Ticket notifications OTRS v6.0.19

Post by root »

Hi,

Please make sure you have configured NotificationSenderAddress and assigned an auto response to the queue where the ticket is creasted.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

Re: [Unsolved] - Troubleshooting Ticket event notifications OTRS v6.0.19

Post by fpleon »

Thank you again, Roy for your rapid answer.
I didn't find NotificationSenderAddress[15] configuration parameter. Nevertheless, I have checked the configuration for NotificationSenderEmail[16] and NotificationSenderName[16]; there were both previously set.
Following your troubleshooting suggestion, I added auto response relations[17] to the Default queue (from Manage Queue-Auto Response Relations), but as is stated in the manual[18], that configuration section only relates to notifications which are sent to the Clients, not to those notifications which are sent to the Agents.
After following your troubleshooting instructions I configured Change Auto Response Relations for Queue Default[17]; now the Client entities receive an auto-response e-mail every time a new ticket is created, replied, followed-up, rejected and removed.

Sadly, Ticket event notifications (those ones which we want to be sent to the Agents) refuse to work as desired (notifying Agents whenever a new ticket event[3] occurs).

Thank anyway for your suggestion. Your new ideas are always welcome (specially when I am running out of those).
I will keep trying and posting any progress.

[15]
SearchForParameterNotificationSenderAddress.png

Code: Select all

 [16]
NotificationSenderEmail:
    ChangeBy: 2
    ChangeTime: 2019-07-06 05:08:26
    CreateBy: 2
    CreateTime: 2019-07-05 20:38:11
    DefaultID: 935
    EffectiveValue: soporte@ofuscated.com.ar
    IsDirty: 0
    IsValid: 1
    ModifiedID: '22'
    Name: NotificationSenderEmail
    ResetToDefault: 0
    SettingUID: Modified2220190706050826
    TargetUserID: ~
    UserModificationActive: 0
  NotificationSenderName:
    ChangeBy: 2
    ChangeTime: 2019-07-05 20:38:44
    CreateBy: 2
    CreateTime: 2019-07-05 20:38:44
    DefaultID: 936
    EffectiveValue: Support Ofuscated - Notificaciones
    IsDirty: 0
    IsValid: 1
    ModifiedID: '23'
    Name: NotificationSenderName
    ResetToDefault: 0
    SettingUID: Modified2320190705203844
    TargetUserID: ~
    UserModificationActive: 0
https://doc.otrs.com/doc/manual/admin/6 ... Email.html

[17]
AutoResponseRelationsForQueue.png
[18] https://doc.otrs.com/doc/manual/admin/6 ... ifications
You do not have the required permissions to view the files attached to this post.
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [Unsolved] - Troubleshooting Ticket event notifications for Agents - OTRS v6.0.19

Post by root »

Hi,

You are right with the NotificationSender* stuff of course. And also regarding the auto response, I just mentioned it because I was not sure because you mentioned sending an e-mail and did not receive a notification.
Did you check the ticket history for notifications? They should be mentioned there. This will help to see if the notifications are not generated or not sended.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

Re: [Unsolved] - Troubleshooting Ticket event notifications for Agents - OTRS v6.0.19

Post by fpleon »

Hi, Roy. Thank you again for your quick response and valuable orientation.
Following your instructions, I created a new ticket from the customer account info@ofuscated.com.ar (CustomerTicketMessage) and replied to it as SupportAgent1 (using AgentTicketCompose). From the AgentTicketZoom I opened Miscelaneous--> history, copied and pasted the results[19]. Two e-mail messages were delivered:
  • Auto-reply to the user for creating a new ticket in the Default queue
  • The reply from SupportAgent1 to Customer info@ofuscated.com.ar

No Ticket event notifications to Agents were created (also checked the queue[8] and the exim4 logs[5]).
Please let me know if I am missing to deliver any complementary information to diagnose this issue.

Thank you again for your clever suggestion. Now we have new information to suspect that the Notification Event aren't even generated (therefore they aren't neither delivered). What am I missing here?

As always, thank you for your suggestions. I will keep trying and keeping posted about any further findouts.

Code: Select all

[19]
07/07/2019 17:50:01
Agent 	Action 	Article
- 	Created ticket [2019070710000046] in "Default" with priority "3 normal" and state "new". (NewTicket) 	
- 	Changed customer to "CustomerID=10;CustomerUser=info@ofuscated.com.ar;". (CustomerUpdate) 	
- 	Added web request from customer. (WebRequestCustomer) 	
- 	Sent auto reply to ""Info Lastname" <info@ofuscated.com.ar>". (SendAutoReply) 	
07/07/2019 17:50:38
Agent 	Action 	Article
SupportAgent SALastname 	Locked ticket. (Lock) 	
SupportAgent SALastname 	Reset of unlock time. (Misc) 	
SupportAgent SALastname 	Changed owner to "SupportAgent1" (2). (OwnerUpdate) 	
07/07/2019 17:51:14
Agent 	Action 	Article
SupportAgent SALastname 	Sent email to ""Info Lastname" <info@ofuscated.com.ar>". (SendAnswer) 	
SupportAgent SALastname 	Reset of unlock time. (Misc) 	
SupportAgent SALastname 	Added 1 time unit(s), for a total of 1 time unit(s). (TimeAccounting) 	
SupportAgent SALastname 	Changed state from "new" to "open". (StateUpdate) 	
SupportAgent SALastname 	ResponseTemplate (1/116286/116288) (Misc) 	
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

Re: [Unsolved] - Troubleshooting Ticket event notifications for Agents - OTRS v6.0.19

Post by fpleon »

Hi, Roy and fellow brains. I promised I would post any news on behalf of this issue. I kept trying and also kept my promise. Nothing we have tried so far offered the desired results (Ticket event notification to agent id#2 (login name Notwork)). So far, it seems that we are doing a pretty good job by documenting this defeat :lol:

In case the omition was related to group permissions, I deleted single user permissions to queues[20] (user_groups table) and replaced permissions with two single roles[21]:
  • role_id 1 = Administrator
  • role_id 2 = TierSupport1
Then I configured the groups[22] for each of those roles. The problem persists.
I decided to create a new user agent (id#16)[23] and assign to that new agent1 the exact same role I assigned to the agent Notwork. Interesting was my surprise to see that this new agent was receiving the ticket event notifications for agents, which meant that the event[3] was doing well for agent id#16, but not for agent id#2. Why? How this could be when they both have the same permissions and both have all the queues[29] set in Personal Preferences --> Notification settings --> "My Queues" ?. I scratched my head for a while and decided to investigate further. The problem persisted.

Then I changed agent id#2's e-mail address to foo@ofuscated.com.ar (everything on the same domain) , and after that change, otrs created one e-mail for each agent (old id#2 and new id#16).
You might think that the problem was solved, but after I changed agent id#2's e-mail, the problem persisted.
I changed the e-mail address to foo@ofuscated.com.ar, made a database dump, dropped the database, purged mariadb-server package[26], removed /var/lib/mysql directory, reinstalled mariadb-server[27] and restored the database. Otrs sends id#2 using foo@ofuscated.com.ar and to id#16. If I change back agent's id#2 e-mail to the proper original e-mail info@ofuscated.com.ar , otrs only creates and sends the event notification for id#16.

I searched for the e-mail address in the System Configuration and the filesystem[28] for any trace of obstruction parameters, but I found none. I checked the user_queues[29] table and user_preferences[30] table, and in user_preferences it seems that agent id#2 has many more rows than agent id#16.

What else could be impeding otrs to create the ticket event notification for agent id#1? Should I try to remove preferences for agent id#1? Of course I did.[31] .Which might be the consequences if I do it in the production environment? So far, no consequences on the testing environment, I just changed each agent's e-mail and subscribed again to the notifications (NotificationTransport) on each agent's personal preferences (as I previously did[29]. Agent id#2 with foo@ e-mail works fine. As soon as I change it back to the desired address info@ofuscated.com.ar, ticket event notifications aren't created for that address. With the last table[30] I tend to think that the problem isn't in the table users, nor user_preferences, nor group_user, nor role_user, nor group_role, nor role_user. Where could it be?

This has been an interesting discovery, yet it still hasn't finished. I will keep exploring and updating this post ultil we or the issue finally win.

As always, any ideas and recommendations are always welcome. If this document had been helpful, I will be grateful if you let me know it.

Code: Select all

[20]
MariaDB [otrs]> MariaDB [otrs]> SELECT * FROM group_user;
Empty set (0.00 sec)

[21]
MariaDB [otrs]> SELECT * FROM role_user;
+---------+---------+---------------------+-----------+---------------------+-----------+
| user_id | role_id | create_time         | create_by | change_time         | change_by |
+---------+---------+---------------------+-----------+---------------------+-----------+
|       1 |       1 | 2019-07-08 05:57:24 |         1 | 2019-07-08 05:57:24 |         1 |
|       2 |       2 | 2019-07-08 07:24:51 |         1 | 2019-07-08 07:24:51 |         1 |
+---------+---------+---------------------+-----------+---------------------+-----------+
3 rows in set (0.00 sec)

[22]
MariaDB [otrs]> SELECT * FROM group_role;
+---------+----------+----------------+------------------+---------------------+-----------+---------------------+-----------+
| role_id | group_id | permission_key | permission_value | create_time         | create_by | change_time         | change_by |
+---------+----------+----------------+------------------+---------------------+-----------+---------------------+-----------+
|       1 |        8 | rw             |                1 | 2010-03-13 23:46:51 |         2 | 2010-03-13 23:46:51 |         2 |
|       2 |        4 | create         |                1 | 2016-09-26 00:29:05 |         2 | 2016-09-26 00:29:05 |         2 |
|       2 |        1 | rw             |                1 | 2015-07-03 11:17:11 |         2 | 2015-07-03 11:17:11 |         2 |
|       2 |        5 | rw             |                1 | 2015-07-03 11:17:11 |         2 | 2015-07-03 11:17:11 |         2 |
|       2 |        4 | ro             |                1 | 2016-09-26 00:29:05 |         2 | 2016-09-26 00:29:05 |         2 |
|       2 |        4 | move_into      |                1 | 2016-09-26 00:29:05 |         2 | 2016-09-26 00:29:05 |         2 |
|       1 |        1 | rw             |                1 | 2019-07-04 23:15:30 |         2 | 2019-07-04 23:15:30 |         2 |
|       1 |        2 | rw             |                1 | 2019-07-04 23:15:31 |         2 | 2019-07-04 23:15:31 |         2 |
|       1 |        3 | rw             |                1 | 2019-07-04 23:15:31 |         2 | 2019-07-04 23:15:31 |         2 |
|       1 |        4 | rw             |                1 | 2019-07-04 23:15:31 |         2 | 2019-07-04 23:15:31 |         2 |
|       1 |        5 | rw             |                1 | 2019-07-04 23:15:31 |         2 | 2019-07-04 23:15:31 |         2 |
|       1 |        6 | rw             |                1 | 2019-07-04 23:15:31 |         2 | 2019-07-04 23:15:31 |         2 |
|       1 |        7 | rw             |                1 | 2019-07-04 23:15:32 |         2 | 2019-07-04 23:15:32 |         2 |
|       1 |        9 | rw             |                1 | 2019-07-04 23:15:32 |         2 | 2019-07-04 23:15:32 |         2 |
|       2 |        6 | create         |                1 | 2019-07-07 20:48:27 |         2 | 2019-07-07 20:48:27 |         2 |
|       2 |        6 | move_into      |                1 | 2019-07-07 20:48:27 |         2 | 2019-07-07 20:48:27 |         2 |
|       2 |        6 | ro             |                1 | 2019-07-07 20:48:27 |         2 | 2019-07-07 20:48:27 |         2 |
|       2 |        7 | create         |                1 | 2019-07-07 20:48:27 |         2 | 2019-07-07 20:48:27 |         2 |
|       2 |        7 | move_into      |                1 | 2019-07-07 20:48:27 |         2 | 2019-07-07 20:48:27 |         2 |
+---------+----------+----------------+------------------+---------------------+-----------+---------------------+-----------+
19 rows in set (0.00 sec)

[23]
MariaDB [otrs]> select * from users;
+----+----------------------------+------------------------------------------------------------------+-------+---------------+---------------+----------+---------------------+-----------+---------------------+-----------+
| id | login                      | pw                                                               | title | first_name    | last_name     | valid_id | create_time         | create_by | change_time         | change_by |
+----+----------------------------+------------------------------------------------------------------+-------+---------------+---------------+----------+---------------------+-----------+---------------------+-----------+
|  1 | root                       | 10e5544ccab284964680c065badc5605671675304d62732554da99ofuscated1 |       | Administrator | Superuser     |        1 | 2004-09-11 19:09:34 |         1 | 2019-07-08 04:51:19 |         2 |
|  2 | Notwork                    | 10e5544ccab284964680c065badc5605671675304d62732554da99ofuscated2 |       | This          | OneDoesntork  |        1 | 2004-09-14 20:42:56 |         1 | 2019-07-08 06:33:53 |         1 |
| 16 | agent1                     | 10e5544ccab284964680c065badc5605671675304d62732554da99ofuscated4 |       | Agent1        | A1Lastname    |        1 | 2019-07-07 20:46:44 |         2 | 2019-07-08 04:57:37 |         2 |
+----+----------------------------+------------------------------------------------------------------+-------+---------------+---------------+----------+---------------------+-----------+---------------------+-----------+
16 rows in set (0.00 sec)

[24]
MariaDB [otrs]> SELECT * FROM role_user;
+---------+---------+---------------------+-----------+---------------------+-----------+
| user_id | role_id | create_time         | create_by | change_time         | change_by |
+---------+---------+---------------------+-----------+---------------------+-----------+
|      16 |       2 | 2019-07-07 20:47:51 |         2 | 2019-07-07 20:47:51 |         2 |
|       1 |       1 | 2019-07-08 05:57:24 |         1 | 2019-07-08 05:57:24 |         1 |
|       2 |       2 | 2019-07-08 07:24:51 |         1 | 2019-07-08 07:24:51 |         1 |
+---------+---------+---------------------+-----------+---------------------+-----------+
3 rows in set (0.00 sec)

[25]
Ticket event notification successfully sent to Agent1 and user_id#2, but changing user's e-mail address (to foo@ofuscated.com.ar)
==> /var/log/user.log <==
Jul  9 03:09:09 srv3 OTRS-CGI-10[10920]: [Info][Kernel::System::Ticket::TicketCreate] New Ticket [2019070910000033/Test 2019070903] created (TicketID=88158,Queue=Default,Priority=3 normal,State=new)
Jul  9 03:09:09 srv3 OTRS-CGI-10[10920]: [Info][Kernel::System::Ticket::Event::NotificationEvent::Transport::Email::SendNotification] Sent agent 'Testing_Agent_Notification' notification to 'agent1@ofuscated.com.ar'.
Jul  9 03:09:09 srv3 OTRS-CGI-10[10920]: [Info][Kernel::System::Ticket::Event::NotificationEvent::Transport::Email::SendNotification] Sent agent 'Testing_Agent_Notification' notification to 'foo@ofuscated.com.ar'.   
Jul  9 03:09:19 srv3 OTRS-otrs.Console.pl-Maint::Email::MailQueue-10[10932]: [Debug] [Kernel::System::Email::SendExecute][737] Trying to send the email using backend 'Kernel::System::Email::SMTP'.

==> /var/log/exim4/mainlog <==
2019-07-09 03:09:19 1hkjJX-0002qM-Rd <= soporte@ofuscated.com.ar H=localhost (soporte.ofuscated.com.ar) [127.0.0.1] P=esmtp S=1159 id=1562652549.58520.7025412449@soporte.ofuscated.com.ar

==> /var/log/user.log <==
Jul  9 03:09:19 srv3 OTRS-otrs.Console.pl-Maint::Email::MailQueue-10[10932]: [Debug][Kernel::System::Email::SendExecute][737] Trying to send the email using backend 'Kernel::System::Email::SMTP'.

==> /var/log/exim4/mainlog <==
2019-07-09 03:09:19 1hkjJX-0002qO-Ul <= soporte@ofuscated.com.ar H=localhost (soporte.ofuscated.com.ar) [127.0.0.1] P=esmtp S=1150 id=1562652549.405420.10804131@soporte.ofuscated.com.ar
2019-07-09 03:09:21 1hkjJX-0002qM-Rd => agent1@ofuscated.com.ar R=smarthost T=remote_smtp_smarthost H=mail.ofuscated.com.ar [208.76.243.50] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,OU=PositiveSSL,CN=s307.c4.mailrelay2p.com"" A=plain C="250 OK id=1hkjJZ-0000Od-Gb"  
2019-07-09 03:09:21 1hkjJX-0002qM-Rd Completed  
2019-07-09 03:09:21 1hkjJX-0002qO-Ul => foo@ofuscated.com.ar R=smarthost T=remote_smtp_smarthost H=mail.ofuscated.com.ar [208.76.243.50] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,OU=PositiveSSL,CN=s307.c4.mailrelay2p.com"" A=plain C="250 OK id=1hkjJZ-0000Oe-Iq"
2019-07-09 03:09:21 1hkjJX-0002qO-Ul Completed

[26]
apt purge mariadb-common automysqlbackup php7.0-mysql libdbd-mysql-perl
## /!\ ## rm -r /var/lib/mysql ## beware, this command deletes all the databases. run exclusively in test environments

[27]
install mariadb-server php7.0-mysql libdbd-mysql-perl

[28]
# grep -ir "info@" /opt/otrs| less -S

[29]
MariaDB [otrs]> select * from personal_queues;
+---------+----------+
| user_id | queue_id |
+---------+----------+
|      16 |        2 |
|      16 |        5 |
|      16 |        7 |
|      16 |        4 |
|       2 |        2 |
|       2 |        5 |
|       2 |        7 |
|       2 |        4 |
+---------+----------+
11 rows in set (0.00 sec)

[30]
MariaDB [otrs]> select * from user_preferences;
+---------+----------------------------------+-------------------------------+
| user_id | preferences_key                  | preferences_value             |
+---------+----------------------------------+-------------------------------+
|      16 | UserMobile                       |                               |
|      16 | UserEmail                        | agent1@ofuscated.com.ar       |
|       2 | UserMobile                       |                               |
|       2 | UserEmail                        | foo@ofuscated.com.ar          |
|       2 | NotificationTransport            | {"Notification-31-Email":"1"} |
|       2 | AppointmentNotificationTransport | {"Notification-28-Email":"1"} |
|      16 | NotificationTransport            | {"Notification-31-Email":"1"} |
|      16 | AppointmentNotificationTransport | {"Notification-28-Email":"1"} |
+---------+----------------------------------+-------------------------------+

[31]
MariaDB [otrs]> delete from user_preferences;
FooNullifiedGroupPermissions.png
Role-AgentRelations.png
Role-GroupRelations.png
You do not have the required permissions to view the files attached to this post.
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
fpleon
Znuny newbie
Posts: 7
Joined: 06 Jul 2019, 09:34
Znuny Version: 6.0.19
Real Name: Federico Ponce de Leon
Company: Intrasoft
Contact:

Re: [Solved] - Troubleshooting Ticket event notifications for Agents - OTRS v6.0.19

Post by fpleon »

Found it...
It weren't the users. I swapped e-mail addresses between agent id#16 and agent id#2 and this time, agent id#2 was sending the message. Every other factor discarded; was the e-mail address. Where else is this e-mail address configured? It was configured for the system's postmaster e-mail address.

It was the "System Email Addresses Management" . I learned something new today: agents can't share e-mail addresses with "System Email Addresses Management" because in that case they will not receive notifications. :lol:

I just changed the e-mail address for the postmaster queue (which was the same as agent id#1) and after that, everything worked as expected.
Thank you Roi for your valuable help; it wouldn't be possible without it.
OTRS Version (6.0.19) . Debian GNU/Linux stretch v9.9.
Post Reply