On Tue, Sep 20, 2022 at 6:45 PM Peter Suter <petsu...@gmail.com> wrote:
>
>
> On 20 Sep 2022 14:41, Roger Oberholtzer wrote:
>
> On Mon, Sep 12, 2022 at 1:43 PM Peter Suter <petsu...@gmail.com> wrote:
>
> Hi,
> Just FYI Trac ~1.2+ has a lot of the Announcer plugin functionality
> integrated in core, and provides its own "new" extension interfaces.
> Joinable groups were prepared here:
> https://trac.edgewall.org/wiki/TracDev/Proposals/AdvancedNotification#Advancedsubscriptions
> https://trac.edgewall.org/changeset/ad2174686247456fb9b6ec3cd97506b863828ca8/psuter.hg/
> https://trac.edgewall.org/ticket/11870
> but never finalized. Nobody seemed really interested in this feature.
> This is the first time I see it mentioned by anyone.
>
> The Announcer plugin could also provide these optional features based on
> the core interfaces, but nobody seems to have been interested in doing
> this so far:
> https://trac-hacks.org/ticket/12120
>
> I'm not sure what the overall goal is with "@Tickets", that is not
> already solved by subscribing to tickets in the default notification
> preferences.
> https://trac.edgewall.org/prefs/notification
> https://trac.edgewall.org/wiki/TracNotification#SubscriberConfiguration
> https://trac.edgewall.org/wiki/CookBook/Notification/Subscriptions
>
> Cheers,
> Peter
>
> On 12 Sep 2022 12:13, Roger Oberholtzer wrote:
>
> On Mon, Sep 12, 2022 at 10:11 AM Roger Oberholtzer
> <roger.oberholt...@gmail.com> wrote:
>
> In Trac 1.2, say, I could define an e-mail tag called @Tickets, and
> all that have subscribed to Tickets in their notifications would get
> e-mails when appropriate.
>
> I have updated to Trac 1.5dev, and I get this when e-mail should be sent:
>
> 2022-09-12 10:05:29,561 Trac[mail] DEBUG: Invalid email address: @Tickets
> 2022-09-12 10:05:29,561 Trac[api] DEBUG: Adding (roger [1]) for
> 'always' on rule (TicketUpdaterSubscriber) for (email)
>
>
> The first line is the issue. The second implies that I will still be
> added to the list of recipients. However, no e-mail is sent. How best
> to proceed?
>
> I see that this was set up in the announcer plugin as follows:
>
> [announcer]
> joinable_groups = Tickets
>
> But that seems not to be Python3 ready.
>
> 2022-09-12 12:02:56,771 Trac[loader] ERROR: Skipping
> "announcer.distributors.mail = announcer.distributors.mail":
> ModuleNotFoundError: No module named 'Queue'
> 2022-09-12 12:02:56,814 Trac[loader] ERROR: Skipping
> "announcer.email_decorators = announcer.email_decorators":
> ModuleNotFoundError: No module named 'Queue'
> 2022-09-12 12:02:56,968 Trac[loader] ERROR: Skipping "announcer.pref =
> announcer.pref": ImportError: cannot import name
> 'ITemplateStreamFilter' from 'trac.web.api'
> (/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/web/api.py)
>
>
>   I will see what I can do.
>
> I have removed using the Announcer plugin. I will try to get the
> notifications working in just Trac and see where that gets me.
>
> I have removed the @Tickets group from the Cc field. So the tickets I
> am testing this with are rather straight forward. No Cc at all.
>
> When I change a ticket, for example, I see this in the log (DEBUG level):
>
>  Trac[api] DEBUG: Adding (roger [1]) for 'always' on rule
> (TicketOwnerSubscriber) for (email)
>  Trac[api] DEBUG: Adding (ssma [1]) for 'always' on rule
> (TicketPreviousUpdatersSubscriber) for (email)
>
> That looks reasonable. These users should get a notification.
>
> However, nothing happens. I have this configuration, which looks
> reasonable to me.
>
>
> [notification]
> admit_domains =
> always_notify_owner = true
> always_notify_reporter = true
> always_notify_updater = true
> email_sender = SmtpEmailSender
> ignore_domains =
> mime_encoding = base64
> smtp_default_domain =
> smtp_enabled = enabled
> smtp_from = t...@systems.rst.ramboll.se
> smtp_from_author = disabled
> smtp_from_name = Do Not Reply
> smtp_replyto = trac@localhost
> smtp_server = smtp.somewherel.com
> ticket_subject_template = ${prefix} #${ticket.id}: ${summary}
> use_public_cc = enabled
> use_short_addr = disabled
> use_tls = disabled
>
> [notification-subscriber]
> always_notify_cc = CarbonCopySubscriber
> always_notify_new_ticket = NewTicketSubscriber
> always_notify_owner = TicketOwnerSubscriber
> always_notify_previous_updater = TicketPreviousUpdatersSubscriber
> always_notify_reporter = TicketReporterSubscriber
> always_notify_updater = TicketUpdaterSubscriber
>
>
> The SMTP server is the same one I used with Trac 1.2 (last version I
> was using). As trac opens the SMPT port directly, I would not expect
> any messages in the system log. And that is the case.
>
> As nothing else is reported, I can't guess why the mail was not sent.
>
> Having said that, in my Trac Preferences->Notifications, it just says
> "Subscriptions" in bold text. And a "Save changes" button. But there
> is no way to actually see or do anything. Perhaps I am missing
> something here so the message is not sent? Or perhaps the Announcer
> plugin has left something in my user info in Trac that is confusing
> things? The plugin is disabled. But maybe more needs to be done?
>
> What components are enabled/disabled?
> Are the EmailDistributor and TicketFormatter components enabled?

None of those are enabled. I see that NewTicketSubscriber is enabled.
Otherwise I cannot see anything that works in this realm.

> What are the next lines in the log after those "Adding" lines?

There are lots of lines about DefaultTicketPolicy since I have to
enable DEBUG level to see anything in the log. I have rights to do
everything, so all checks say allowed. So I will skip those. The lines
after that (skipping DefaultTicketPolicy) are:

2022-09-21 09:44:27,164 Trac[main] DEBUG: Dispatching
<RequestWithSession "POST '/ticket/1337'">
2022-09-21 09:44:27,165 Trac[main] DEBUG: Chosen handler is <Component
trac.ticket.web_ui.TicketModule>
2022-09-21 09:44:27,165 Trac[api] INFO: Synchronized '(default)'
repository in 0.00 seconds
2022-09-21 09:44:27,166 Trac[session] DEBUG: Retrieving session for ID 'roger'
2022-09-21 09:44:27,171 Trac[main] DEBUG: Negotiated locale: en-US -> en_US
2022-09-21 09:44:27,183 Trac[api] DEBUG: Trying to render HTML preview
using PygmentsRenderer [no annotations]
2022-09-21 09:44:27,566 Trac[api] DEBUG: Adding (roger [1]) for
'always' on rule (TicketOwnerSubscriber) for (email)
2022-09-21 09:44:27,567 Trac[api] DEBUG: Adding (ssma [1]) for
'always' on rule (TicketPreviousUpdatersSubscriber) for (email)
2022-09-21 09:44:27,567 Trac[web_ui] DEBUG: Side effect for
ConfigurableTicketWorkflow
2022-09-21 09:44:27,617 Trac[main] DEBUG: Dispatching
<RequestWithSession "GET '/ticket/1337'">
2022-09-21 09:44:27,617 Trac[main] DEBUG: Chosen handler is <Component
trac.ticket.web_ui.TicketModule>
2022-09-21 09:44:27,618 Trac[api] INFO: Synchronized '(default)'
repository in 0.00 seconds
2022-09-21 09:44:27,619 Trac[session] DEBUG: Retrieving session for ID 'roger'
2022-09-21 09:44:27,628 Trac[main] DEBUG: Negotiated locale: en-US -> en_US

> Is there a line containing "has found the following formats"?

Nope. Nowhere in the log file at all.


-- 
Roger Oberholtzer

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CANkOqwN%2BTRdqJ_FnNHXDjbN3P-3HviXYOjhC40cYB2DdCd4Oaw%40mail.gmail.com.

Reply via email to