SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
31.
問題 例外を吐くと .... This is the Postfix program at host snares.example.com. : The Postfix program >test@example.com< : Command died with status 1: "/var/MailApp/mailserver/test.rb". Command output: /usr/lib/ruby/1.8/logger.rb:518:in `initialize': Permission denied - /var/MailApp/mailserver/../log/MailServer.log (Errno::EACCES) from /usr/lib/ruby/1.8/logger.rb:518:in `open' from /usr/lib/ruby/1.8/logger.rb:518:in `open_logfile' from ユーザー宛にエラーメール
36.
require 'net/pop' task :mail_fetcher => [:environment] do @config = YAML.load(IO.read("#{RAILS_ROOT}/config/mail_fetcher.yml")) daemonize() loop do pop = Net::POP3.new(@config[RAILS_ENV]['server']) pop.start(@config[RAILS_ENV]['username'], @config[RAILS_ENV]['password']) unless pop.mails.empty? pop.each_mail do |m| IncomingMailHandler.receive(m.pop) m.delete end end pop.finish sleep(SLEEP_TIME) end end