Opened 7 years ago

Closed 6 years ago

#6311 closed defect (fixed)

announcer plugin fails for tickets

Reported by: dereks@… Owned by: Robert Corsaro
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: configuration documentation
Cc: Steffen Hoffmann Trac Release: 0.11


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.

default_email_format = text/html
admit_domains =
#always_notify_owner = false
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
email_address_resolvers = SpecifiedEmailResolver, SessionEmailResolver
ignore_domains =
mime_encoding = base64
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = true
smtp_from =
smtp_from_name = CST Support Trac
smtp_password = mypasswerd
smtp_port = 10025
smtp_replyto =
smtp_server =
smtp_subject_prefix = __default__
smtp_user = loginnamehere
ticket_subject_template = $prefix #$ $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 Robert Corsaro

Owner: changed from Stephen Hansen to Robert Corsaro

comment:2 Changed 7 years ago by Robert Corsaro

Status: newassigned

What branch are you using? Please setup 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 7 years ago by Nick Peirson

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:

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 #$ $summary
use_public_cc = False
use_short_addr = false
use_tls = false


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.generic.threadingemaildecorator = enabled
announcer.email_decorators.ticket.ticketaddlheaderemaildecorator = enabled
announcer.email_decorators.ticket.ticketsubjectemaildecorator = enabled = enabled
announcer.filters.change_author.changeauthorfilter = enabled
announcer.filters.unsubscribe.unsubscribefilter = enabled
announcer.formatters.ticket.ticketformatter = enabled = enabled
announcer.opt.acct_mgr.announce.accountmanagerannouncement = enabled
announcer.pref.announcerpreferences = enabled
announcer.producers.attachment.attachmentchangeproducer = enabled
announcer.producers.ticket.ticketchangeproducer = enabled = 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 = 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 7 years ago by Steffen Hoffmann

Cc: Steffen Hoffmann 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 Steffen Hoffmann

Keywords: configuration added

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 Nick Peirson

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 Steffen Hoffmann

Keywords: documentation added
Resolution: fixed
Status: assignedclosed

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.

Modify Ticket

as closed The owner will remain Robert Corsaro.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.