Opened 12 years ago
Closed 8 years ago
#10980 closed defect (wontfix)
sendmail_path not being used....
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | configuration |
Cc: | Steffen Hoffmann | Trac Release: | 1.0 |
Description (last modified by )
I've tried every permutation of the config below and from the trac logs I see Errno 2 No file or Directory
errors whenever it tries to send an email.
trac just doesn't seem to use my sendmail_path. Also, it seems that it's using <Project Name> <trac@localhost> ... is it using trac@localhost as a hard coded value somewhere?
[notification] email_sender = SendmailEmailSender sendmail_path = /usr/sbin/sendmail [announcer] email_sender = SendmailEmailSender sendmail_path = /usr/sbin/sendmail always_notify_owner = false always_notify_reporter = false always_notify_updater = true ambiguous_char_width = single batch_subject_template = $prefix Batch modify: $tickets_descr mime_encoding = none smtp_enabled = enabled smtp_from = <email> smtp_password = smtp_replyto = <email> smtp_subject_prefix = __default__ smtp_user = ticket_subject_template = $prefix #$ticket.id: $summary use_public_cc = false use_short_addr = false use_tls = true email_enabled = true
Attachments (2)
Change History (24)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
Keywords: | configuration added |
---|---|
Priority: | highest → normal |
Severity: | blocker → normal |
comment:4 Changed 12 years ago by
Owner: | changed from Steffen Hoffmann to Ryan J Ollos |
---|---|
Status: | new → assigned |
Replying to troypatterson21@gmail.com:
... Also, it seems that it's using <Project Name> <trac@localhost> ... is it using trac@localhost as a hard coded value somewhere?
Try setting [announcer]
email_from
. There's also an email_reply_to
option under that section.
In general, your configuration has a lot of obsolete options. For example, smtp_from
is obsolete. Again, see AnnouncerPlugin#EmailConfig.
Everything I said above applies if you are using r12503 of the trunk, but may not apply otherwise.
Please confirm if it is working for you so that we can close this ticket out.
comment:5 Changed 12 years ago by
Hey so I made the changes you suggested and now I see this in the log
2013-03-28 07:17:24,165 Trac[mail] DEBUG: EmailDistributor found the address 'troypatterson21@gmail.com' for 'tpatters (authenticated)' via: SessionEmailResolver 2013-03-28 07:17:24,165 Trac[mail] DEBUG: EmailDistributor expected local delivery for tpatters to: troypatterson21@gmail.com 2013-03-28 07:17:24,165 Trac[mail] DEBUG: EmailDistributor is sending event as 'text/plain' to: troypatterson21@gmail.com 2013-03-28 07:17:24,166 Trac[mail] DEBUG: All email recipients: [u'troypatterson21@gmail.com'] File "build/bdist.linux-i686/egg/announcer/distributors/mail.py", line 330, in distribute File "build/bdist.linux-i686/egg/announcer/distributors/mail.py", line 506, in _do_send File "build/bdist.linux-i686/egg/announcer/distributors/mail.py", line 515, in send self.email_sender.send(from_addr, recipients, message) AttributeError: Cannot find an implementation of the "IEmailSender" interface named "SmtpEmailSender". Please update the option announcer.email_sender in trac.ini.
Changed 12 years ago by
Attachment: | SmtpEmailSender.png added |
---|
comment:6 Changed 12 years ago by
I just checked the code on the trunk, and there is an SmtpEmailSender
class:
class SmtpEmailSender(Component): """E-mail sender connecting to an SMTP server.""" implements(IEmailSender)
My best guess is that you haven't enabled this Component
. Could you make sure that you have?:
[components] announcer.distributors.mail.smtpemailsender = enabled
You can enable it from the WebAdmin panel:
comment:7 follow-ups: 15 17 Changed 12 years ago by
Cc: | Steffen Hoffmann added; anonymous removed |
---|
The error message,
AttributeError: Cannot find an implementation of the "IEmailSender" interface named "SmtpEmailSender". Please update the option announcer.email_sender in trac.ini.
might be more helpful if we change the last sentence to: Please check that the Component is enabled or update the option announcer.email_sender in trac.ini.
comment:8 follow-up: 9 Changed 12 years ago by
Hey, so it looks like its working now! Awesome! One last issue...
It seems that updates to watched pages get an email notification but other notifications like "Forgot Your Password" isn't working...
comment:9 Changed 12 years ago by
Replying to troypatterson21@gmail.com:
Hey, so it looks like its working now! Awesome! One last issue...
It seems that updates to watched pages get an email notification but other notifications like "Forgot Your Password" isn't working...
We need a bit more information from you. I have it working here with recent versions of AccountManagerPlugin. So my initial question is, which version of that plugin you're running?
comment:11 Changed 12 years ago by
I wonder if this could be another case of the component not being enabled.
Do you have one of the following in trac.ini?:
[components] announcer.opt.acct_mgr.* = enabled
[components] announcer.opt.acct_mgr.announce = enabled
comment:12 follow-up: 14 Changed 12 years ago by
I actually have the *
option enabled and no dice. I check the logs and no errors are reported. It says password reset for user. The debug messages says AnnoucementSystem has found the following subscriptions:
. Then it says sent event in 0.0 seconds. Any clues?
comment:13 Changed 12 years ago by
I can't tell you what's wrong off-hand, I'll have to do some testing, but maybe hasienda knows. Before I start testing with AccountManagerPlugin, could you confirm that you are using the trunk r12503 of AnnouncerPlugin, and let us know which Trac version you are using (i.e. 1.0 or 1.0.1)?
Is Forgot Your Password the only notification that is not working? Knowing that will help us definitively isolate the problem to the AnnouncerPlugin's AccountManager support.
Could you paste the exact relevant portion of the log message, or attach the log file (provided it is not too large, or just trim it down a bit to the relevant portions)? If you move the existing log file and create an empty log file (see t:TracLogging), restart Trac and then immediately try the Forgot Your Password link, that will provide us the most information (we may see the AnnouncerPlugin's AccountManager component being skipped when Trac starts due to an error in the code).
Finally, please paste your revised announcer
and sendmail
sections from trac.ini
.
hasienda: is it okay if I push the change described in comment:7?
comment:14 Changed 12 years ago by
Replying to Troypatterson21@gmail.com:
I actually have the
*
option enabled and no dice. I check the logs and no errors are reported. It says password reset for user. The debug messages saysAnnoucementSystem has found the following subscriptions:
. Then it says sent event in 0.0 seconds. Any clues?
Clearly you've not configured the Announcer side appropriately by now. There is no subscription to pick-up the announcement. You need to enable announcer.opt.acct_mgr.announce.accountmanagerannouncement
at least and select to receive that announcements at the user announcements/subscriptions preferences panel. At this stage it is obviously a configuration issue.
OTOH I'm already thinking about making the configuration a bit easier, because it is really too complicated from my point of view too. But it's too early to talk about solutions now. I'm still investigating solutions.
comment:15 Changed 12 years ago by
Replying to rjollos:
might be more helpful if we change the last sentence to: Please check that the Component is enabled or update the option announcer.email_sender in trac.ini.
Sure, but quote the option name for clarity, please.
comment:16 Changed 12 years ago by
comment:17 Changed 11 years ago by
Replying to rjollos:
The error message,
AttributeError: Cannot find an implementation of the "IEmailSender" interface named "SmtpEmailSender". Please update the option announcer.email_sender in trac.ini.might be more helpful if we change the last sentence to: Please check that the Component is enabled or update the option announcer.email_sender in trac.ini.
It turns out that this message is coming from Trac. [announcer] email_sender
is an ExtensionOption. The exception is raised in the __get__
method of ExtensionOption. The error message will be improved in trac:#11427.
comment:19 Changed 11 years ago by
Replying to troypatterson21@…:
Hey guys sorry for the delayed response. I've attached the config file.
Here is what I have installed plugin-wise
I've tested now with the latest:
- AccountManagerPlugin 0.5dev-r13381
- AnnouncerPlugin 1.0dev-r12503
Since you had HtPasswdHashMethod
but not HtDigestHashMethod
enabled, I added:
[account-manager] hash_method = HtPasswdHashMethod
Now, since you are using HTTP auth, the Forgot your password link in the metanav will not be shown, as we've recently discussed on the mailing list. Navigating directly to /reset_password
, it seems that it should be possible to reset the password, but I always get the warning:
This is the same issue we are experiencing on trac-hacks.org. I don't know enough about the stores and hash methods to say if it is a configuration issue, or if there is a defect.
Do you see similar behavior?
comment:21 Changed 8 years ago by
Owner: | Ryan J Ollos deleted |
---|---|
Status: | assigned → new |
comment:22 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Please upgrade to Trac 1.2, which has integrated the core of AnnouncerPlugin. Please raise the issue on the trac:MailingList if you encounter the issue with Trac 1.2.
Try:
Regarding your second question, I'll get back to you shortly.
See AnnouncerPlugin#EmailConfig.