Email notification issue

29 views
Skip to first unread message

Rolf Boelens

unread,
Jan 12, 2023, 6:09:03 PM1/12/23
to Trac Users
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 = enabled
smtp_from_author = disabled
smtp_server = <<domino server name>>
use_public_cc = disabled
use_short_addr = disabled
use_tls = disabled


Apache configuration (trac.conf):
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LDAPTrustedGlobalCert 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>

RjOllos

unread,
Jan 12, 2023, 7:51:16 PM1/12/23
to Trac Users
Which Trac version and do you have any plugins installed? 

Jun Omae

unread,
Jan 12, 2023, 10:09:48 PM1/12/23
to trac-...@googlegroups.com
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> (大前 潤)

Rolf Boelens

unread,
Jan 13, 2023, 2:22:23 AM1/13/23
to Trac Users
We've installed TRAC version 1.4.3:
TRAC_version_info.png

Installed plugins:
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.
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:

Jun Omae

unread,
Jan 16, 2023, 4:37:04 AM1/16/23
to trac-...@googlegroups.com, rolfb...@gmail.com
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.
perms-group.diff
Reply all
Reply to author
Forward
0 new messages