ReportMailer.daily_report.deliver
ArgumentError: wrong number of arguments (0 for 1)
from /var/www/html/snorby/app/mailers/report_mailer.rb:3:in daily_report' from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionpack-3.1.12/lib/abstract_controller/base.rb:167:inprocess_action'
from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionpack-3.1.12/lib/abstract_controller/base.rb:121:in process' from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionpack-3.1.12/lib/abstract_controller/rendering.rb:45:inprocess'
from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionmailer-3.1.12/lib/action_mailer/old_api.rb:65:in process' from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionmailer-3.1.12/lib/action_mailer/base.rb:474:inprocess'
from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionmailer-3.1.12/lib/action_mailer/base.rb:469:in initialize' from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionmailer-3.1.12/lib/action_mailer/base.rb:456:innew'
from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/actionmailer-3.1.12/lib/action_mailer/base.rb:456:in method_missing' from (irb):1 from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/railties-3.1.12/lib/rails/commands/console.rb:45:instart'
from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/railties-3.1.12/lib/rails/commands/console.rb:8:in start' from /var/www/html/snorby/vendor/cache/ruby/1.9.1/gems/railties-3.1.12/lib/rails/commands.rb:40:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in' **
I doubt a mail configuration is wrong. Because when i try to run Daily Cache Job , I got a similar error:
\ > Snorby::Jobs::DailyCacheJob.new(true).perform
[~] Building Sensor Metrics
[~] Building Signature Metrics
[~] Building Classification Metrics
[~] Building Severity Metrics
wrong number of arguments (0 for 1)
/var/www/html/snorby/app/mailers/report_mailer.rb:3:in `daily_report'
Sensor 2: Error: Unable to send report - please make sure your mail configurations are correct.
=> #<Delayed::Backend::DataMapper::Job @id=2979 @priority=1 @attempts=0 @handler="--- !ruby/struct:Snorby::Jobs::DailyCacheJob \nverbose: false\n" @run_at=Thu, 30 Oct 2014 00:00:00 +0700 @locked_at=nil @locked_by=nil @failed_at=nil @last_error=nil>
I try to send a daily report to my mail with this command as https://github.com/Snorby/snorby/wiki/Manually-Run-Reports
but I got this error below:
I doubt a mail configuration is wrong. Because when i try to run Daily Cache Job , I got a similar error: \ > Snorby::Jobs::DailyCacheJob.new(true).perform
[~] Building Sensor Metrics [~] Building Signature Metrics [~] Building Classification Metrics [~] Building Severity Metrics
wrong number of arguments (0 for 1) /var/www/html/snorby/app/mailers/report_mailer.rb:3:in `daily_report' Sensor 2: Error: Unable to send report - please make sure your mail configurations are correct. => #<Delayed::Backend::DataMapper::Job @id=2979 @priority=1 @attempts=0 @handler="--- !ruby/struct:Snorby::Jobs::DailyCacheJob \nverbose: false\n" @run_at=Thu, 30 Oct 2014 00:00:00 +0700 @locked_at=nil @locked_by=nil @failed_at=nil @last_error=nil>
but my Snorby's configuration look like correct:
Snorby Mail Configuration
Gmail Example:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "snorby.org",
:user_name => "snorby",
:password => "snorby",
:authentication => "plain",
:enable_starttls_auto => true
}
Sendmail Example:
ActionMailer::Base.delivery_method = :sendmail ActionMailer::Base.sendmail_settings = { :location => '/usr/sbin/sendmail', :arguments => '-i -t' }
ActionMailer::Base.perform_deliveries = true ActionMailer::Base.raise_delivery_errors = true
Mail.register_interceptor(DevelopmentMailInterceptor) if Rails.env.development?
~
when I try to run "sendmail" command with "sendmail xxx@abc.com < text.txt", I can get a mail without a problem.
Please help me