Modify

Opened 11 years ago

Closed 7 years ago

#10980 closed defect (wontfix)

sendmail_path not being used....

Reported by: troypatterson21@… Owned by:
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: configuration
Cc: Steffen Hoffmann Trac Release: 1.0

Description (last modified by Ryan J Ollos)

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)

SmtpEmailSender.png (32.7 KB) - added by anonymous 11 years ago.
trac.zip (3.1 KB) - added by troypatterson21@… 11 years ago.
Config File

Download all attachments as: .zip

Change History (24)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 11 years ago by Ryan J Ollos

Try:

[announcer]
email_sender = SmtpEmailSender

[sendmail]
sendmail_path = /usr/sbin/sendmail

Regarding your second question, I'll get back to you shortly.

See AnnouncerPlugin#EmailConfig.

comment:3 Changed 11 years ago by Ryan J Ollos

Keywords: configuration added
Priority: highestnormal
Severity: blockernormal

comment:4 in reply to:  description Changed 11 years ago by Ryan J Ollos

Owner: changed from Steffen Hoffmann to Ryan J Ollos
Status: newassigned

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 11 years ago by troypatterson21@…

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 11 years ago by anonymous

Attachment: SmtpEmailSender.png added

comment:6 Changed 11 years ago by Ryan J Ollos

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 Changed 11 years ago by Ryan J Ollos

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 Changed 11 years ago by troypatterson21@…

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 in reply to:  8 Changed 11 years ago by Steffen Hoffmann

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:10 Changed 11 years ago by anonymous

I'm using version 0.4.3 ...

comment:11 Changed 11 years ago by Ryan J Ollos

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 Changed 11 years ago by troypatterson21@…

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 11 years ago by Ryan J Ollos

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 in reply to:  12 Changed 11 years ago by Steffen Hoffmann

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 says AnnoucementSystem 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 in reply to:  7 Changed 11 years ago by Steffen Hoffmann

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 11 years ago by troypatterson21@…

Hey guys sorry for the delayed response. I've attached the config file.

Here is what I have installed plugin-wise

  • Trac 1.0
  • TracAccountManager 0.5dev-r12751
  • TracAnnouncer 1.0dev-r12503
  • TracWysiwyg 0.12.0.4-r12680

If you require anything else, please let me know!

Changed 11 years ago by troypatterson21@…

Attachment: trac.zip added

Config File

comment:17 in reply to:  7 Changed 10 years ago by Ryan J Ollos

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:18 Changed 10 years ago by Ryan J Ollos

#11469 was opened and related to investigation in this ticket.

comment:19 Changed 10 years ago by Ryan J Ollos

Replying to troypatterson21@…:

Hey guys sorry for the delayed response. I've attached the config file.

Here is what I have installed plugin-wise

  • Trac 1.0
  • TracAccountManager 0.5dev-r12751
  • TracAnnouncer 1.0dev-r12503
  • TracWysiwyg 0.12.0.4-r12680

I've tested now with the latest:

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:

close Warning: Email and username must match a known account.

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:20 Changed 7 years ago by Ryan J Ollos

comment:21 Changed 7 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted
Status: assignednew

comment:22 Changed 7 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
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.