Project

General

Profile

Actions

Defect #3989

closed

testing email sent, notification not

Added by Daniel Sintaj over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
-
Start date:
2009-10-07
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

hi there..

i appreciate your work on this awesome and really helpful, flexible project. :)
everything's going great so far, but i have just one little problem.

after our last upgrade (084-svn-2845) i noticed, that watchers who are involed in some project or a particular ticket are no longer notified about any changes that are made.

info:

OS: Fedora 11, krenel: 2.6.29.6-217.2.16.fc11.x86_64
Ruby: 1.8.6 (2009-06-08 patchlevel 369) [x86_64-linux]
Rails: 2.3.4
DB: MySQL 5

Our settings are just fine, when I try to send a testing email - it will pass without any problem.

...but our watchers aren't notified at all.

I would really appreciate your help and again, thanks for the great work on the Redmine project.

environment.rb:

  ActionMailer::Base.delivery_method = :sendmail
  ActionMailer::Base.sendmail_settings = {
   :location => '/usr/sbin/sendmail',
   :arguments => '-i -t'
  }
  config.action_mailer.perform_deliveries = true
  config.action_mailer.delivery_method = :sendmail
  config.action_mailer.default_charset = "utf-8" 
  config.action_mailer.raise_delivery_errors = true

email.yml:

production:
   delivery_method: :sendmail
   sendmail_settings:
     location: /usr/sbin/sendmail
     arguments: -i -t

I did read other issues, but unfortunately none of them were helpful. :(

~ Daniel.

Actions #1

Updated by Jean-Philippe Lang over 14 years ago

Can you have a look at your sendmail log please?

Actions #2

Updated by Daniel Sintaj over 14 years ago

Thanks for your reply.

Here is the thing:

I removed sendmail and started to use postfix at localhost, I have changed some configuration files and I'm going to post them all so you can see through the issue.

I even updated to 0.8.5 but it didn't help as well.

/opt/redmine/trunk/config/email.yml

production:
  delivery_method: :smtp
  smtp_settings:
    address: localhost
    port: 25
    domain: mydomain.com
    authentication: :none

/opt/redmine/trunk/config/environment.rb

# Be sure to restart your web server when you modify this file.

# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
#RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

# Load Engine plugin if available
begin
  require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
rescue LoadError
  # Not available
end

Rails::Initializer.run do |config|
  # Settings in config/environments/* take precedence those specified here

  # Skip frameworks you're not going to use
  # config.frameworks -= [ :action_web_service, :action_mailer ]

  # Add additional load paths for sweepers
  config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )

  # Force all environments to use the same logger level
  # (by default production uses :info, the others :debug)
  # jojo
  config.log_level = :info

  # Use the database for sessions instead of the file system
  # (create the session table with 'rake db:sessions:create')
  config.action_controller.session_store = :active_record_store
  #config.action_controller.session_store = :PStore

  # Enable page/fragment caching by setting a file-based store
  # (remember to create the caching directory and make it readable to the application)
  # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache" 

  # Activate observers that should always be running
  # config.active_record.observers = :cacher, :garbage_collector
  config.active_record.observers = :message_observer

  # Make Active Record use UTC-base instead of local time
  # config.active_record.default_timezone = :utc

  # Use Active Record's schema dumper instead of SQL when creating the test database
  # (enables use of different database adapters for development and test environments)
  # config.active_record.schema_format = :ruby

  # Deliveries are disabled by default. Do NOT modify this section.
  # Define your email configuration in email.yml instead.
  # It will automatically turn deliveries on
  # xdaan
  config.action_mailer.perform_deliveries = true
  #config.action_mailer.delivery_method = :smtp
  #config.action_mailer.default_charset = "utf-8" 
  #config.action_mailer.raise_delivery_errors = true
end

/opt/redmine/trunk/config/environments/production.rb

# Settings specified here will take precedence over those in config/environment.rb

# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true

# Use a different logger for distributed setups
# config.logger        = SyslogLogger.new

# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching             = true

# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host                  = "http://assets.example.com" 

# Disable delivery errors if you bad email addresses should just be ignored
# jojo
config.action_mailer.raise_delivery_errors = false

# No email in production log
# jojo
config.action_mailer.logger = nil

/otp/redmine/trunk/config/initializers/40-email.rb

# Loads action_mailer settings from email.yml
# and turns deliveries on if configuration file is found

filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
if File.file?(filename)
  mailconfig = YAML::load_file(filename)

  if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env)
    # Enable deliveries
    ActionMailer::Base.perform_deliveries = true

    mailconfig[Rails.env].each do |k, v|
      v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
      ActionMailer::Base.send("#{k}=", v)
    end
  end
end

And this is what happens when I updated issue with watchers.. (no sign about email)

Processing IssuesController#edit (for 147.175.181.80 at 2009-10-10 14:14:18) [POST]
  Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submit", "action"=>"edit", "id"=>"320", "notes"=>"bbq", "controller"=>"issues", "issue"=>{"start_date"=>"2009-10-09", "estimated_hours"=>"", "lock_version"=>"3", "priority_id"=>"4", "subject"=>"postfix test", "description"=>"all night long...", "done_ratio"=>"0", "due_date"=>"", "assigned_to_id"=>"", "status_id"=>"1"}, "attachments"=>{"1"=>{"description"=>""}}}
Redirected to https://mydomain.com/issues/320
Completed in 63ms (DB: 17) | 302 Found [https://mydomain.com/issues/320/edit]

Processing IssuesController#show (for 147.175.181.80 at 2009-10-10 14:14:19) [GET]
  Parameters: {"action"=>"show", "id"=>"320", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 382ms (View: 340, DB: 18) | 200 OK [https://mydomain.com/issues/320]

When I try to send a testing mail, here is what happens in /var/log/maillog:

Oct 10 14:17:06 devel postfix/smtpd[18888]: connect from localhost[127.0.0.1]
Oct 10 14:17:06 devel postfix/smtpd[18888]: E7FE05F76: client=localhost[127.0.0.1]
Oct 10 14:17:06 devel postfix/cleanup[18891]: E7FE05F76: message-id=<4ad07b42df550_1f673f99f21dbc8c596@devel.mydomain.tmail>
Oct 10 14:17:07 devel postfix/qmgr[8100]: E7FE05F76: from=<redmine@mydomain.com>, size=1174, nrcpt=1 (queue active)
Oct 10 14:17:07 devel postfix/smtpd[18888]: disconnect from localhost[127.0.0.1]
Oct 10 14:17:28 devel postfix/smtp[18892]: E7FE05F76: to=<Daniel.Sintaj@mydomain.com>, relay=ns.externaldomain.sk[195.168.92.90]:25, delay=21, delays=0.07/0.02/0.21/21, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as AAAB7C70055)
Oct 10 14:17:28 devel postfix/qmgr[8100]: E7FE05F76: removed

If you would require more information, just tell me, I'll try to attach them.

Actions #3

Updated by Jean-Philippe Lang over 14 years ago

Comment out this line in environments/production.rb to see the emails in your log file:

config.action_mailer.logger = nil
Actions #4

Updated by Daniel Sintaj over 14 years ago

after doing:

# config.action_mailer.logger = nil

this happened:


Processing ProjectsController#show (for 147.175.181.80 at 2009-10-10 17:10:47) [GET]
  Parameters: {"jump"=>"my", "action"=>"show", "id"=>"internalcloud", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/show
Completed in 250ms (View: 219, DB: 13) | 200 OK [https://pm.profitcomputing.com/projects/internalcloud?jump=my]

Processing ProjectsController#activity (for 147.175.181.80 at 2009-10-10 17:10:49) [GET]
  Parameters: {"action"=>"activity", "id"=>"internalcloud", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/activity
Completed in 623ms (View: 506, DB: 22) | 200 OK [https://pm.profitcomputing.com/projects/internalcloud/activity]

Processing IssuesController#show (for 147.175.181.80 at 2009-10-10 17:10:56) [GET]
  Parameters: {"action"=>"show", "id"=>"320", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 184ms (View: 139, DB: 18) | 200 OK [https://pm.profitcomputing.com/issues/320]

Processing IssuesController#edit (for 147.175.181.80 at 2009-10-10 17:11:18) [POST]
  Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submit", "action"=>"edit", "id"=>"320", "notes"=>"bbq", "controller"=>"issues", "issue"=>{"start_date"=>"2009-10-09", "estimated_hours"=>"", "lock_version"=>"4", "priority_id"=>"4", "subject"=>"postfix test", "description"=>"all night long...", "done_ratio"=>"10", "due_date"=>"", "assigned_to_id"=>"", "status_id"=>"1"}, "attachments"=>{"1"=>{"description"=>""}}}
Redirected to https://pm.profitcomputing.com/issues/320
Completed in 64ms (DB: 17) | 302 Found [https://pm.profitcomputing.com/issues/320/edit]

Processing IssuesController#show (for 147.175.181.80 at 2009-10-10 17:11:18) [GET]
  Parameters: {"action"=>"show", "id"=>"320", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 380ms (View: 162, DB: 191) | 200 OK [https://pm.profitcomputing.com/issues/320]

Postfix log says nothing.

Actions #5

Updated by Jean-Philippe Lang over 14 years ago

Make sure that 'Issue updated' is cheched in Administration -> Settings -> Email notifications.

Actions #6

Updated by Daniel Sintaj over 14 years ago

I'm pretty sure that everything appropriate is checked.

Actions #7

Updated by Philippe Lambert over 14 years ago

I have exactly the same problem (since I updated to the last stable version). I received notifications when I add a file but not in all the other cases... I tried to debug it, but nothing shows up in the logs (yeah, i configured email logging).

We lost our productivity because it's now difficult to know what's going on...

Actions #8

Updated by Philippe Lambert over 14 years ago

I put a wrong revision number when i updated... It works now!

Actions #9

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid
Actions #10

Updated by J.K Wang over 14 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Jean-Philippe Lang

can u tell me what's the meaning of "wrong revision number" ?
I can't receive any mail notifications after I update from 0.84 to 0.85.
Thanks

Actions #11

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from Reopened to Closed

J.K: I'm closing this and wait your feedback in #4318.

Actions

Also available in: Atom PDF