Snorby / snorby

Ruby On Rails Application For Network Security Monitoring
Other
1k stars 226 forks source link

Report Mailer can't sending the report #458

Open titanotom opened 7 years ago

titanotom commented 7 years ago

Hi,

I was fresh installed snorby in my IDS server. But when i try configure email with gmail configuration it can't sending email report to my email.. it is my mail_config.rb file:

//# Snorby Mail Configuration

//# # //# Gmail Example: //# //ActionMailer::Base.delivery_method = :smtp //ActionMailer::Base.smtp_settings = { // :address => "smtp.gmail.com", // :port => 587, // :domain => "gmail.com", // :user_name => "mymailusername", // :password => "mypassword", // :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?

And when i try to run manually to send the report in this instruction https://github.com/Snorby/snorby/wiki/Manually-Run-Reports, i got the error message like this

root@snortIDS:/var/www/html/snorby# rails c Jammit Warning: Asset compression disabled -- Java unavailable. No time_zone specified in snorby_config.yml; detected time_zone: Asia/Jakarta /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.22/lib/action_dispatch/http/mime_type.rb:102: warning: already initialized constant PDF Loading development environment (Rails 3.2.22) irb(main):001:0> ReportMailer.daily_report.deliver, ReportMailer.weekly_report.deliver, ReportMailer.monthly_report.deliver SyntaxError: (irb):1: syntax error, unexpected '\n', expecting '=' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.22/lib/rails/commands/console.rb:47:in start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.22/lib/rails/commands/console.rb:8:instart' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.22/lib/rails/commands.rb:41:in <top (required)>' from script/rails:6:inrequire' from script/rails:6:in `

' irb(main):002:0>

Please, guide me...Thank you..