Mailing List Archive

Email notification issue
We've installed TRAC on a Linux (Ubuntu) server.
Everything runs fine, except for email notifications for ticket updates.

We want to send the email notifications using our company Domino Server.
We are using TRAC on a Windows server for years now with the same (SMTP)
configuration.

When I now submit a ticket change, I get the following error:
*2023-01-12 07:21:46,104 Trac[web_ui] ERROR: Failure sending notification
on change to ticket #3: AttributeError: 'list' object has no attribute
'update'*

I tried to google for this error, but no success.
What can be the root cause of this issue?

With TELNET I can connect to the SMTP server:
sudo telnet <<domino server name>> 25

TRAC notification configuration (trac.ini):






*[notification]smtp_enabled = enabledsmtp_from_author = disabledsmtp_server
= <<domino server name>>use_public_cc = disableduse_short_addr =
disableduse_tls = disabled*

Apache configuration (trac.conf):


















*LoadModule ldap_module modules/mod_ldap.soLoadModule authnz_ldap_module
modules/mod_authnz_ldap.soLDAPTrustedGlobalCert CA_BASE64
"/home/trac_admin/Downloads/CS03.cer"WSGIScriptAlias /trac/es
/var/www/html/trac/es/cgi-bin/trac.wsgi<Location /trac/es> AuthType Basic
AuthName "Apache LDAP ES authentication" AuthBasicProvider file ldap
AuthLDAPUrl "ldaps://<<installation specific>>?samAccountName?" "SSL"
AuthLDAPBindDN " <<installation specific>> " AuthLDAPBindPassword
<<hidden password>> LDAPReferrals Off AuthUserFile
/var/lib/trac/global_pwd/trac.htpasswd LogLevel debug Require
valid-user</Location>*

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/114884c3-9f90-49ad-8d47-02f2f63c15dan%40googlegroups.com.
Re: Email notification issue [ In reply to ]
On Thursday, January 12, 2023 at 3:09:03 PM UTC-8 rolfb...@gmail.com wrote:
We've installed TRAC on a Linux (Ubuntu) server.
Everything runs fine, except for email notifications for ticket updates.

We want to send the email notifications using our company Domino Server.
We are using TRAC on a Windows server for years now with the same (SMTP)
configuration.

When I now submit a ticket change, I get the following error:
*2023-01-12 07:21:46,104 Trac[web_ui] ERROR: Failure sending notification
on change to ticket #3: AttributeError: 'list' object has no attribute
'update'*

I tried to google for this error, but no success.
What can be the root cause of this issue?

With TELNET I can connect to the SMTP server:
sudo telnet <<domino server name>> 25

TRAC notification configuration (trac.ini):






*[notification]smtp_enabled = enabledsmtp_from_author = disabledsmtp_server
= <<domino server name>>use_public_cc = disableduse_short_addr =
disableduse_tls = disabled*

Apache configuration (trac.conf):


















*LoadModule ldap_module modules/mod_ldap.soLoadModule authnz_ldap_module
modules/mod_authnz_ldap.soLDAPTrustedGlobalCert CA_BASE64
"/home/trac_admin/Downloads/CS03.cer"WSGIScriptAlias /trac/es
/var/www/html/trac/es/cgi-bin/trac.wsgi<Location /trac/es> AuthType Basic
AuthName "Apache LDAP ES authentication" AuthBasicProvider file ldap
AuthLDAPUrl "ldaps://<<installation specific>>?samAccountName?" "SSL"
AuthLDAPBindDN " <<installation specific>> " AuthLDAPBindPassword
<<hidden password>> LDAPReferrals Off AuthUserFile
/var/lib/trac/global_pwd/trac.htpasswd LogLevel debug Require
valid-user</Location>*

Which Trac version and do you have any plugins installed?

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ce1ba5d0-0ed7-491b-b11c-698719262c99n%40googlegroups.com.
Re: Email notification issue [ In reply to ]
Hi,

On 2023/01/12 18:25, Rolf Boelens wrote:
> We've installed TRAC on a Linux (Ubuntu) server.
> Everything runs fine, except for email notifications for ticket updates. 
>
> We want to send the email notifications using our company Domino Server.
> We are using TRAC on a Windows server for years now with the same (SMTP) configuration.
>
> When I now submit a ticket change, I get the following error:
> /2023-01-12 07:21:46,104 Trac[web_ui] ERROR: Failure sending notification on change to ticket #3: AttributeError: 'list' object has no attribute 'update'/
>
> I tried to google for this error, but no success. 
> What can be the root cause of this issue?

Found root cause. That is a Trac issue.

This issue raises if permission group name is used in owner, reporter or
updater of a ticket when the ticket is updated.

Workaround is to rename the permission group name to something that is not used
as a reporter or owner of tickets or username (e.g. "admin" -> "%admin").

The exception will go away by the following patch, however notifications to the
users will no longer fire when the permission group is used in reporter, owner
or updater of the ticket.


diff --git a/trac/ticket/notification.py b/trac/ticket/notification.py
index c213175a5..72be61af8 100644
--- a/trac/ticket/notification.py
+++ b/trac/ticket/notification.py
@@ -750,6 +750,7 @@ def _ticket_change_subscribers(subscriber, candidates):
return
if not isinstance(candidates, (list, set, tuple)):
candidates = [candidates]
+ candidates = set(candidates)

# Get members of permission groups
groups = PermissionSystem(subscriber.env).get_groups_dict()


--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/0cdc63f8-0298-4bbe-6c25-bfa6d55d77f8%40gmail.com.
Re: Email notification issue [ In reply to ]
We've installed TRAC version 1.4.3:
[image: TRAC_version_info.png]

Installed plugins:
[image: Installed_plugins.png]

After some more testing and debugging, it appears the
'ticket_notify_email.txt' template was not correct. I've now used the
template as can be found here
<https://trac.edgewall.org/wiki/TracNotification>.
Now it works for tickets reported by "normal" users.
When a ticket is reported by "admin", the notification email is still not
send (with error "*Failure sending notification on change to ticket #xx:
AttributeError: 'list' object has no attribute 'update'"*
This is no problem in normal usage as normally the admin account won't
report tickets.

Op vrijdag 13 januari 2023 om 04:09:48 UTC+1 schreef Jun Omae:

> Hi,
>
> On 2023/01/12 18:25, Rolf Boelens wrote:
> > We've installed TRAC on a Linux (Ubuntu) server.
> > Everything runs fine, except for email notifications for ticket updates.
> >
> > We want to send the email notifications using our company Domino Server.
> > We are using TRAC on a Windows server for years now with the same (SMTP)
> configuration.
> >
> > When I now submit a ticket change, I get the following error:
> > /2023-01-12 07:21:46,104 Trac[web_ui] ERROR: Failure sending
> notification on change to ticket #3: AttributeError: 'list' object has no
> attribute 'update'/
> >
> > I tried to google for this error, but no success.
> > What can be the root cause of this issue?
>
> Found root cause. That is a Trac issue.
>
> This issue raises if permission group name is used in owner, reporter or
> updater of a ticket when the ticket is updated.
>
> Workaround is to rename the permission group name to something that is not
> used
> as a reporter or owner of tickets or username (e.g. "admin" -> "%admin").
>
> The exception will go away by the following patch, however notifications
> to the
> users will no longer fire when the permission group is used in reporter,
> owner
> or updater of the ticket.
>
>
> diff --git a/trac/ticket/notification.py b/trac/ticket/notification.py
> index c213175a5..72be61af8 100644
> --- a/trac/ticket/notification.py
> +++ b/trac/ticket/notification.py
> @@ -750,6 +750,7 @@ def _ticket_change_subscribers(subscriber, candidates):
> return
> if not isinstance(candidates, (list, set, tuple)):
> candidates = [candidates]
> + candidates = set(candidates)
>
> # Get members of permission groups
> groups = PermissionSystem(subscriber.env).get_groups_dict()
>
>
> --
> Jun Omae <jun...@gmail.com> (?? ?)
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/5ba679a1-403a-4f40-9211-0179f8289e84n%40googlegroups.com.
Re: Email notification issue [ In reply to ]
On 2023/01/13 16:10, Rolf Boelens wrote:
> After some more testing and debugging, it appears the 'ticket_notify_email.txt' template was not correct. I've now used the template as can be found here <https://trac.edgewall.org/wiki/TracNotification>.
> Now it works for tickets reported by "normal" users. 
> When a ticket is reported by "admin", the notification email is still not send (with error "/Failure sending notification on change to ticket #xx: AttributeError: 'list' object has no attribute 'update'"/
> This is no problem in normal usage as normally the admin account won't report tickets.

I've filed the issue in https://trac.edgewall.org/ticket/13515
Please try attached patch to fix it.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/6aaccb39-4958-8cbf-69be-9a9d90f6c359%40gmail.com.