Opened 7 years ago

Closed 6 years ago

announcer plugin fails for tickets

Reported by: Owned by: dereks@… doki_pen normal AnnouncerPlugin normal configuration documentation hasienda 0.11

Description

If I submit a new ticket using email (via email2trac) then everything works fine.

But if I submit a new ticket via the web GUI, then I don't get an email notification.

The native Trac notifications work fine, for both email2trac and the web GUI. Only AnnouncerPlugin has this problem.

I grepped the log file for "ERROR" and nothing (relevant) showed up.

I think this is a config problem, but I've been over the docs multiple times and I don't know what to try next. Config section below.

[announcer]
default_email_format = text/html
#always_notify_owner = false
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
ignore_domains =
mime_encoding = base64
smtp_always_bcc =
smtp_always_cc = dereks@my-domain.com
smtp_default_domain =
smtp_enabled = true
smtp_from = support@my-domain.com
smtp_from_name = CST Support Trac
smtp_port = 10025
smtp_server = outbound.mailhop.org
smtp_subject_prefix = __default__
ticket_subject_template = $prefix #$ticket.id: $summary #use_public_cc = false use_public_cc = true use_short_addr = false use_tls = false  Attachments (0) Change History (8) comment:1 Changed 7 years ago by doki_pen • Owner changed from ixokai to doki_pen comment:2 Changed 7 years ago by doki_pen • Status changed from new to assigned What branch are you using? Please setup logging [logging] log_file = trac.log log_level = DEBUG log_type = file  And paste here. You should see some lines about subscribers that may shed some light on the subject. comment:3 Changed 6 years ago by nickp I'm seeing the same problem, the inbuilt notifications work fine, but I get nothing from the announcer plugin. I get lines in the log as expected, but I've checked my mail server log and it doesn't even get a connection attempt from trac. Th most frustrating thing is I've set up a trac install with the announcer plugin that's worked fine when I was with a previous company and didn't run into any issues with it. Log lines were: 2010-07-30 14:32:02,256 Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions: [dblakemore(authenticated) via email], [nickp(authenticated) via email] 2010-07-30 14:32:02,256 Trac[api] DEBUG: AnnouncementSystem sent event in 0.0 seconds.  My config is as follows: [announcer] admit_domains = always_notify_owner = true always_notify_reporter = true always_notify_updater = true default_email_format = text/html email_address_resolvers = SpecifiedEmailResolver, SessionEmailResolver email_sender = SmtpEmailSender ignore_domains = mime_encoding = none notify_on_failed_build = true notify_on_successful_build = false smtp_always_bcc = smtp_always_cc = smtp_default_domain = smtp_enabled = true smtp_from = trac@nickp-ubuntu smtp_from_name = Trac smtp_password = smtp_port = 25 smtp_replyto = trac@nickp-ubuntu smtp_server = localhost smtp_subject_prefix = __default__ smtp_user = ticket_subject_template =$prefix #$ticket.id:$summary
use_public_cc = False
use_tls = false

...

[components]
...
announcer.* = enabled
announcer.api.announcementsystem = enabled
announcer.distributors.mail.emaildistributor = enabled
announcer.distributors.mail.sendmailemailsender = enabled
announcer.distributors.mail.smtpemailsender = enabled
announcer.email_decorators.generic.announceremaildecorator = enabled
announcer.email_decorators.generic.staticemaildecorator = enabled
announcer.email_decorators.ticket.ticketsubjectemaildecorator = enabled
announcer.email_decorators.wiki.wikisubjectemaildecorator = enabled
announcer.filters.change_author.changeauthorfilter = enabled
announcer.filters.unsubscribe.unsubscribefilter = enabled
announcer.formatters.ticket.ticketformatter = enabled
announcer.formatters.wiki.wikiformatter = enabled
announcer.opt.acct_mgr.announce.accountmanagerannouncement = enabled
announcer.pref.announcerpreferences = enabled
announcer.producers.attachment.attachmentchangeproducer = enabled
announcer.producers.ticket.ticketchangeproducer = enabled
announcer.producers.wiki.wikichangeproducer = enabled
announcer.resolvers.sessionemail.sessionemailresolver = enabled
announcer.resolvers.specified.specifiedemailresolver = enabled
announcer.subscribers.ticket_compat.carboncopysubscriber = enabled
announcer.subscribers.ticket_compat.legacyticketsubscriber = enabled
announcer.subscribers.ticket_components.ticketcomponentsubscriber = enabled
announcer.subscribers.ticket_custom.ticketcustomfieldsubscriber = enabled
announcer.subscribers.ticket_groups.joinablegroupsubscriber = enabled
announcer.subscribers.watch_users.userchangesubscriber = enabled
announcer.subscribers.watchers.watchsubscriber = enabled
announcer.subscribers.wiki.generalwikisubscriber = enabled


I've enabled things I don't need at the moment, just in case I'd missed anything. I'll refine the config once I've got it working.

comment:4 Changed 6 years ago by hasienda

• Cc hasienda added; anonymous removed

This is an irritating issue, since we have both working and non-working applications and no error in the logs. Ticket announcements works for me as well.

If there is no subtle misconfiguration (don't suspect that, but will have to check), it might be related to using email addresses from Trac db vs. from additional user preferences in Announcer db space, however that's just a quick guess.

comment:5 Changed 6 years ago by hasienda

Oh, coming from a major rewrite of AnnouncerPlugin's wiki page this might be easier than I thought before. I can't spot the following essential statement in your config snippets above:

email_enabled = true


Figure, we'll need some more intelligence to treat smtp_enabled = true as a working fall-back/synonym, right?

comment:6 Changed 6 years ago by anonymous

Thanks for the response, it prompted me to take another look at it. Adding

email_enabled = true


didn't solve the problem for me. I then went back to the wiki page, spotted the 'fast path' config and dumped it in my trac.ini in place of my config and I started getting emails. Woo!

I then did the decent thing and went through my config line by line to see what was breaking it. The line preventing emails from being sent was

mime_encoding = none


Not sure why this was breaking it, but adding email_enabled, as you pointed out, and removing mime_encoding has fixed the problem. I did try them separately, but it was only both changes in combination that worked.

comment:7 Changed 6 years ago by nickp

Didn't realise I wasn't logged in when replying, my anonymous reply relates to my earlier reply to this ticket (07/03/2010).

comment:8 Changed 6 years ago by hasienda

• Resolution set to fixed
• Status changed from assigned to closed

Glad your application is up and running, so our documentation lifting certainly payed off for you.

There are some known encoding issues, namely in the header IIRC, but this is a different story. I'll make a note here to check for different settings of mime_encoding = * in the future. Thanks for your patient testing, observation and feedback.