Ticket #3160 (closed defect: fixed)

Opened 4 months ago

Last modified 3 months ago

Group (@Groupname) Emails Not Being Sent

Reported by: wbranderson@gmail.com Assigned to: doki_pen
Priority: high Component: AnnouncerPlugin
Severity: normal Keywords: email group delivery configuration
Cc: Trac Release: 0.11

Description

This is more a quest for information than anything else. I have the following configuration in my trac.ini file:

[announcer] admit_domains = always_notify_owner = true always_notify_reporter = true always_notify_updater = true ignore_domains = mime_encoding = base64 smtp_always_bcc = smtp_default_domain = mydomain.local smtp_enabled = true smtp_from = trac-notify@mydomain.net smtp_from_name = Trac Ticket Notification System smtp_password = smtp_port = 25 smtp_replyto = donotreply@mydomain.net smtp_server = domaincontroller.mydomain.local smtp_user = ticket_email_header_fields = owner, reporter, type, status, milestone, component, priority, version, resolution ticket_subject_template = $prefix #$ticket.id: $summary use_public_cc = false use_short_addr = false use_tls = false joinable_groups = Management, Leads

[components] announcerplugin.* = enabled announcerplugin.subscribers.ticket_compat.carboncopysubscriber = disabled announcerplugin.subscribers.ticket_compat.staticticketsubscriber = disabled announcerplugin.resolvers.sessionemail.sessionemailresolver = disabled announcerplugin.resolvers.specified.specifiedemailresolver = disabled

I am running tracd (0.11) on a Windows 2003 SBS. I since I have the legacy options enabled, each ticket reporter is getting a copy of the ticket via email. However, no one in the Management or Leads group is getting a copy of the ticket over email.

Does anything look wrong in the configuration?

If nothing looks wrong, is there a fix (e.g. currently available patch or a future fix) for the problem I am experiencing?

TIA,

Brett

Attachments

localmail.patch (0.9 kB) - added by anonymous on 06/23/08 09:51:20.
localmail.2.patch (0.9 kB) - added by doki_pen on 06/23/08 09:52:02.
Allow mail to be sent with no username/password
localmail.3.patch (0.7 kB) - added by doki_pen on 06/23/08 12:54:49.
allow anonymous mail sending

Change History

06/10/08 12:15:38 changed by wbranderson@gmail.com

Let's try that post again with the proper formatting:

[announcer] admit_domains =
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
ignore_domains =
mime_encoding = base64
smtp_always_bcc =
smtp_default_domain = mydomain.local
smtp_enabled = true
smtp_from = trac-notify@mydomain.net
smtp_from_name = Trac Ticket Notification System
smtp_password =
smtp_port = 25
smtp_replyto = donotreply@mydomain.net
smtp_server = domaincontroller.mydomain.local
smtp_user =
ticket_email_header_fields = owner, reporter, type, status, milestone, component, priority, version, resolution
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false
joinable_groups = Management, Leads

And for the record, before using the announcer plugin, the standard ticket notification system worked as billed. And to clarify, the version of Trac running is 0.11rc1, not previous betas.

06/23/08 09:50:51 changed by doki_pen

Emails are not sent without logging in. Here you have no username/password. I had the same problem and made a patch that solves it. attachment:"localmail.patch". Please commit to trunk.

06/23/08 09:51:20 changed by anonymous

  • attachment localmail.patch added.

06/23/08 09:52:02 changed by doki_pen

  • attachment localmail.2.patch added.

Allow mail to be sent with no username/password

06/23/08 09:53:08 changed by anonymous

Well, seems that my attachment is not uploading properly.

Index: trac-hacks/announcerplugin/announcerplugin/distributors/email_distributor.py
===================================================================
--- trac-hacks/announcerplugin/announcerplugin/distributors/email_distributor.py        (revision 303)
+++ trac-hacks/announcerplugin/announcerplugin/distributors/email_distributor.py        (revision 304)
@@ -273,7 +273,8 @@
     def _transmit(self, smtpfrom, addresses, message):
         smtp = smtplib.SMTP()
         smtp.connect(self.smtp_server)
-        smtp.login(self.smtp_user, self.smtp_password)
+        if self.smtp_user:
+            smtp.login(self.smtp_user, self.smtp_password)
         smtp.sendmail(smtpfrom, addresses, message)
         smtp.quit()
         
@@ -313,4 +314,4 @@
             preferences = prefs,
         )
         
-        return "prefs_announcer_email.html", data    
\ No newline at end of file
+        return "prefs_announcer_email.html", data  

06/23/08 12:16:23 changed by wbranderson@gmail.com

Your patch file posted correctly as an attachment ... you just have to click "Download in Original Format" at the bottom of the attachment page. Patch and Diff files do not display correctly in Trac.

I will apply the patch and let you know what happens! Thanks for the help!

06/23/08 12:42:56 changed by coderanger

Please remake it without the No newline at end of file marker. Note that this is already fixed in 0.11 :-)

06/23/08 12:54:49 changed by doki_pen

  • attachment localmail.3.patch added.

allow anonymous mail sending

06/23/08 12:59:54 changed by doki_pen

ok, that should be better

06/23/08 13:12:56 changed by wbranderson@gmail.com

The patch did not work for me--same behavior as before.

  • Reporters receive email
  • Assigned parties receive email
  • Updaters receive email

But no email is sent to any of the @Groupname groups. I also tried the fix posted on ticket #2697; when trying that fix no one receives any email.

Is there anything else I can try? Note: the email address I am trying to send the email from is not the same as the logged in user's account.

TIA,

Brett

06/23/08 13:51:03 changed by doki_pen

Post smtp logs and trac logs.

06/23/08 14:23:52 changed by wbranderson@gmail.com

Trac log for an email event:

2008-06-23 14:09:45,697 Trac[main] DEBUG: Dispatching <Request "POST u'/ticket/102'">
2008-06-23 14:09:45,729 Trac[chrome] DEBUG: Prepare chrome data for request
2008-06-23 14:09:45,744 Trac[session] DEBUG: Retrieving session for ID u'firstname.lastname'
2008-06-23 14:09:46,072 Trac[api] DEBUG: AnnouncementSystem? found the following subscribers capable of handling 'ticket, changed': LegacyTicketSubscriber?, WatchSubscriber?
2008-06-23 14:09:46,072 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber? added 'firstname.lastname' because of rule: component owner
2008-06-23 14:09:46,088 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber? added 'firstname.lastname (authenticated)' because of rule: always_notify_owner
2008-06-23 14:09:46,088 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber? added 'firstname.lastname (authenticated)' because of rule: always_notify_reporter
2008-06-23 14:09:46,088 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber? added 'firstname.lastname (authenticated)' because of rule: always_notify_updater
2008-06-23 14:09:46,088 Trac[api] DEBUG: AnnouncementSystem? has found the following subscriptions: [firstname.lastname(authenticated) via email]
2008-06-23 14:09:46,088 Trac[email_distributor] DEBUG: EmailDistributor? has found the following formats capable of handling 'email' of 'ticket': text/html, text/plain
2008-06-23 14:09:46,088 Trac[email_distributor] DEBUG: EmailDistributor? determined the preferred format for 'firstname.lastname (authenticated)' is: text/html
2008-06-23 14:09:46,088 Trac[email_distributor] DEBUG: EmailDistributor? found the address 'firstname.lastname@mydomain.local' for 'firstname.lastname (authenticated)' via: DefaultDomainEmailResolver?
2008-06-23 14:09:46,088 Trac[email_distributor] DEBUG: EmailDistributor? is sending event as 'text/html' to: firstname.lastname@mydomain.local
2008-06-23 14:09:46,558 Trac[email_distributor] DEBUG: EmailDistributor? took 0.19 seconds to send.
2008-06-23 14:09:46,558 Trac[api] DEBUG: AnnouncementSystem? sent event in 0.49 seconds.

It doesn't even look like either of the groups I have created (Management and Leads) are being referenced, even though the groups were intended to be copied on the ticket. I'll get the SMTP log out in a few minutes.

06/23/08 14:57:00 changed by wbranderson@gmail.com

There isn't any information in either the Windows 2K3 SBS message tracking tool or the exchange server log. It looks as if the emails for the joinable groups are never even being sent from the announcerplugin to the exchange server.

Let me know if you need anything else.

06/24/08 10:28:07 changed by doki_pen

can you add:

[components]
announcerplugin.subscribers.ticket_groups

to your config and try again?

06/24/08 10:46:10 changed by wbranderson@gmail.com

Exactly that line, or the following line?

[components]
announcerplugin.subscribers.ticket_groups = enabled

06/24/08 10:58:47 changed by doki_pen

add the second line to the components section

06/24/08 10:59:53 changed by wbranderson@gmail.com

Adding the line I posted in the previous comment did not fix the problem. Same output.

2008-06-24 11:42:13,805 Trac[main] DEBUG: Dispatching <Request "POST u'/newticket'">
2008-06-24 11:42:13,836 Trac[chrome] DEBUG: Prepare chrome data for request
2008-06-24 11:42:13,852 Trac[session] DEBUG: Retrieving session for ID u'firstname.lastname'
2008-06-24 11:42:14,118 Trac[api] DEBUG: AnnouncementSystem found the following subscribers capable of handling 'ticket, created': LegacyTicketSubscriber, WatchSubscriber
2008-06-24 11:42:14,118 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'firstname.lastname' because of rule: component owner
2008-06-24 11:42:14,118 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'firstname.lastname (authenticated)' because of rule: always_notify_owner
2008-06-24 11:42:14,118 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'firstname.lastname (authenticated)' because of rule: always_notify_reporter
2008-06-24 11:42:14,118 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'firstname.lastname (authenticated)' because of rule: always_notify_updater
2008-06-24 11:42:14,118 Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions: [firstname.lastname(authenticated) via email]
2008-06-24 11:42:14,118 Trac[email_distributor] DEBUG: EmailDistributor has found the following formats capable of handling 'email' of 'ticket': text/html, text/plain
2008-06-24 11:42:14,118 Trac[email_distributor] DEBUG: EmailDistributor determined the preferred format for 'firstname.lastname (authenticated)' is: text/html
2008-06-24 11:42:14,118 Trac[email_distributor] DEBUG: EmailDistributor found the address 'firstname.lastname@mydomain.local' for 'firstname.lastname (authenticated)' via: DefaultDomainEmailResolver
2008-06-24 11:42:14,118 Trac[email_distributor] DEBUG: EmailDistributor is sending event as 'text/html' to: firstname.lastname@mydomain.local
2008-06-24 11:42:14,759 Trac[email_distributor] DEBUG: EmailDistributor took 0.33 seconds to send.
2008-06-24 11:42:14,759 Trac[api] DEBUG: AnnouncementSystem sent event in 0.66 seconds.

The line of most interest, I think, is the line that reads:

2008-06-24 11:42:14,118 Trac[api] DEBUG: AnnouncementSystem found the following subscribers capable of handling 'ticket, created': LegacyTicketSubscriber, WatchSubscriber

It seems like that is where the JoinableGroups? subscribers should be found, yes?

07/17/08 15:50:02 changed by anonymous

  • priority changed from normal to high.

I also face the same problem. The email is not sent.

The log says

2008-07-17 21:25:41,709 Trac[email_distributor] DEBUG: EmailDistributor? determined the preferred format for 'xxxxxxx (authenticated)' is: text/html 2008-07-17 21:25:41,709 Trac[email_distributor] DEBUG: EmailDistributor? found the address 'xxxxx.xxx@xx.xxx' for 'xxxxx (authenticated)' via: SpecifiedEmailResolver? 2008-07-17 21:25:41,709 Trac[email_distributor] DEBUG: EmailDistributor? is sending event as 'text/html' to: xxxxx.xxxx@xx.xx 2008-07-17 21:25:41,806 Trac[email_distributor] DEBUG: EmailDistributor? took 0.0 seconds to send.

How can I get the Announcer plugin working

07/17/08 16:04:45 changed by anonymous

  • owner changed from ixokai to anonymous.
  • status changed from new to assigned.

07/17/08 16:05:04 changed by doki_pen

  • owner changed from anonymous to doki_pen.
  • status changed from assigned to new.

07/17/08 16:05:18 changed by doki_pen

I just took over this plugin. I'll have a look by Sunday.

07/17/08 16:15:46 changed by doki_pen

  • status changed from new to assigned.

07/20/08 15:19:59 changed by wbranderson@gmail.com

Thanks for taking a look doki_pen. FYI, I have since upgraded to 0.11 (and am still experiencing the same problem). Keep us posted on how things progress!

TIA,

Brett

07/21/08 08:06:32 changed by anonymous

Looks like revision 3107 broke the query around line 50. code never tested after change!! lol. Fixing now.

07/21/08 08:33:33 changed by anonymous

Should be fixed in -r4045 Please test and tell me how it works

07/21/08 10:10:30 changed by wbranderson@gmail.com

Just installed -r4048 and it works for me. I would close the ticket, but in the interest of making sure it works for all other interested parties, I'll leave it up. Thanks doki_pen!

07/21/08 10:22:48 changed by doki_pen

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #3160 (Group (@Groupname) Emails Not Being Sent)




Change Properties
Action