Modify

Opened 17 years ago

Closed 16 years ago

#3160 closed defect (fixed)

Group (@Groupname) Emails Not Being Sent

Reported by: wbranderson@… Owned by: Robert Corsaro
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@… smtp_from_name = Trac Ticket Notification System smtp_password = smtp_port = 25 smtp_replyto = donotreply@… 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 (3)

localmail.patch (932 bytes) - added by anonymous 17 years ago.
localmail.2.patch (932 bytes) - added by Robert Corsaro 17 years ago.
Allow mail to be sent with no username/password
localmail.3.patch (719 bytes) - added by Robert Corsaro 17 years ago.
allow anonymous mail sending

Download all attachments as: .zip

Change History (27)

comment:1 Changed 17 years ago by wbranderson@…

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@…
smtp_from_name = Trac Ticket Notification System
smtp_password =
smtp_port = 25
smtp_replyto = donotreply@…
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.

comment:2 Changed 17 years ago by Robert Corsaro

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.

Changed 17 years ago by anonymous

Attachment: localmail.patch added

Changed 17 years ago by Robert Corsaro

Attachment: localmail.2.patch added

Allow mail to be sent with no username/password

comment:3 Changed 17 years ago by anonymous

Well, seems that my attachment is not uploading properly.

  • trac-hacks/announcerplugin/announcerplugin/distributors/email_distributor.py

     
    273273    def _transmit(self, smtpfrom, addresses, message):
    274274        smtp = smtplib.SMTP()
    275275        smtp.connect(self.smtp_server)
    276         smtp.login(self.smtp_user, self.smtp_password)
     276        if self.smtp_user:
     277            smtp.login(self.smtp_user, self.smtp_password)
    277278        smtp.sendmail(smtpfrom, addresses, message)
    278279        smtp.quit()
    279280       
     
    313314            preferences = prefs,
    314315        )
    315316       
    316         return "prefs_announcer_email.html", data   
    317  No newline at end of file
     317        return "prefs_announcer_email.html", data 

comment:4 Changed 17 years ago by wbranderson@…

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!

comment:5 Changed 17 years ago by Noah Kantrowitz

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

Changed 17 years ago by Robert Corsaro

Attachment: localmail.3.patch added

allow anonymous mail sending

comment:6 Changed 17 years ago by Robert Corsaro

ok, that should be better

comment:7 Changed 17 years ago by wbranderson@…

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

comment:8 Changed 17 years ago by Robert Corsaro

Post smtp logs and trac logs.

comment:9 Changed 17 years ago by wbranderson@…

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@…' 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@…
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.

comment:10 Changed 17 years ago by wbranderson@…

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.

comment:11 Changed 17 years ago by Robert Corsaro

can you add:

[components]
announcerplugin.subscribers.ticket_groups

to your config and try again?

comment:12 Changed 17 years ago by wbranderson@…

Exactly that line, or the following line?

[components]
announcerplugin.subscribers.ticket_groups = enabled

comment:13 Changed 17 years ago by Robert Corsaro

add the second line to the components section

comment:14 Changed 17 years ago by wbranderson@…

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?

comment:15 Changed 16 years ago by anonymous

Priority: normalhigh

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@…' 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@… 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

comment:16 Changed 16 years ago by anonymous

Owner: changed from Stephen Hansen to anonymous
Status: newassigned

comment:17 Changed 16 years ago by Robert Corsaro

Owner: changed from anonymous to Robert Corsaro
Status: assignednew

comment:18 Changed 16 years ago by Robert Corsaro

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

comment:19 Changed 16 years ago by Robert Corsaro

Status: newassigned

comment:20 Changed 16 years ago by wbranderson@…

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

comment:21 Changed 16 years ago by anonymous

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

comment:22 Changed 16 years ago by anonymous

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

comment:23 Changed 16 years ago by wbranderson@…

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!

comment:24 Changed 16 years ago by Robert Corsaro

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.