Modify

Opened 4 years ago

Closed 4 years ago

#7346 closed defect (worksforme)

email_enabled chronically false on 0.12, and when hacked, no address found

Reported by: mjt@… Owned by: doki_pen
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: email-address configuration
Cc: hasienda Trac Release: 0.12

Description

There are two users subscribing to notifications.

Nothing gets sent at first due to this kind of an error:

2010-07-07 15:58:05,815 Trac[mail] DEBUG: EmailDistributer email_enabled set to false

I tried setting things like

announcer.email_enabled = enabled

with mail. and whatnot in between. Everything fails.

Question number 1: Where is that enabled, as the admin view has nothing?

Then I went to hack the sources:

        #if not self.enabled or not found:
        if False:

This enabled me to get to the next problem of the plugin not finding email addresses.

I hacked the sources again:

        self.log.debug("mjt: recipients: %s" % recipients)

Now I got this in the log:

2010-07-07 16:05:46,975 Trac[mail] DEBUG: mjt: recipients: set([(u'mjt', True, None), (u'tumppi', True, None)])
2010-07-07 16:05:46,975 Trac[mail] DEBUG: EmailDistributor determined the preferred format for 'mjt (authenticated)' is: text/plain
2010-07-07 16:05:46,976 Trac[mail] DEBUG: EmailDistributor was unable to find an address for: mjt (authenticated)
2010-07-07 16:05:46,977 Trac[mail] DEBUG: EmailDistributor was unable to find an address for: tumppi (authenticated)

Question number two: What must I do, besides set my email address, to make this understand email addresses?

Trac is 0.12 (pip install whatever) and Python 2.5.2 fwiw.

Thanks!

Attachments (0)

Change History (7)

comment:1 follow-up: Changed 4 years ago by mjt@…

Here's the relevant conf:

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

comment:2 in reply to: ↑ 1 Changed 4 years ago by anonymous

Replying to mjt@cloudingsky.com:

Here's the relevant conf:

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

It works! If you install IniAdminPlugin and go to admin page in the section announcer there is option to enable email_enabled. In that case it works for me!

comment:3 follow-ups: Changed 4 years ago by mjt@…

Thanks for that, it did help me along!

The system is still, however, unable to resolve the email addresses.

The announcer.email_address_resolvers is not documented, and I have what is probably the default:

SpecifiedEmailResolver, SessionEmailResolver, DefaultDomainEmailResolver

Any thoughts on that? It's somewhat insane, because the users have email addresses in there...

comment:4 in reply to: ↑ 3 Changed 4 years ago by anonymous

Replying to mjt@cloudingsky.com:

Thanks for that, it did help me along!

The system is still, however, unable to resolve the email addresses.

The announcer.email_address_resolvers is not documented, and I have what is probably the default:

SpecifiedEmailResolver, SessionEmailResolver, DefaultDomainEmailResolver

Any thoughts on that? It's somewhat insane, because the users have email addresses in there...

Well here everything works OK for me! It sends HTML messages. Maybe troubel is your config problem. Did you fill everything in the announcer section in trac.ini?
I mean did you fill there smtp server or user and password and other stuff??
And did you use smtp or not? Did you disable the default notofocation plugin?

comment:5 in reply to: ↑ 3 Changed 4 years ago by hasienda

  • Cc hasienda added
  • Keywords email-address configuration added
  • Priority changed from highest to normal

Replying to mjt@cloudingsky.com:

Thanks for that, it did help me along!

The system is still, however, unable to resolve the email addresses.

The announcer.email_address_resolvers is not documented, and I have what is probably the default:

SpecifiedEmailResolver, SessionEmailResolver, DefaultDomainEmailResolver

Well, as a matter of fact, this is documented in a dedicated section on AnnouncerPlugin's wiki page. I had no problem to follow. I just use

email_address_resolvers = SessionEmailResolver

here with Trac 0.12, and it works with the email-addresses specified in Trac (or maybe it is AccountManagerPlugin?, sorry, can't figure this out right now.). No special procedure needed to enable it, like was discussed before.

Still I've no experience, if it comes to using email-addresses specified in AnnouncerPlugin user perferences, and thats what 'SpecifiedEmailResolver' is looking for.

Is that relevant in your case? I think so. Now, since it seems like a normal local installation issue, I suggest to not puff it up so much.

comment:6 Changed 4 years ago by hasienda

It was right there in the docs, but I must confess, somewhat hidden down in the page. Anyway, please check the current version of AnnouncerPlugin's wiki page and you'll find

[announcer]
email_enabled = true

right there on top of the much straightened 'Central configuration' section. Hope that will finally help.

comment:7 Changed 4 years ago by doki_pen

  • Resolution set to worksforme
  • Status changed from new to closed

email_enabled is now on by default. If you are on trunk, please read the much improved AnnouncerPlugin. Near the bottom there is a section on email server configuration.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.