메일러와 함께 이메일을 보내려고 할 때 Ruby on Rails의 응용 프로그램에 갑자기 아래와 같은 오류가 발생했습니다 Gmail을 사용합니다.Rails 메일러 오류 "Errno :: ECONNREFUSED (Connection refused ...)"설치 후 & 제거됨 Postfix
이 문제는 설치가 너무 어렵 기 때문에 & 서버 (Apache/CentOS)에서 "postfix"를 제거한 후에 시작되었습니다. 그 전에 메일러는 제대로 작동하고있었습니다.
관련 코딩하며 다음과 같이
NoticeMailer#newtask_email: processed outbound mail in 2.5ms
I, [2016-08-19T10:55:13.429666 #3782] INFO -- :
Sent mail to [email protected] (4.2ms)
D, [2016-08-19T10:55:13.429750 #3782] DEBUG -- : Date: Fri, 19 Aug 2016 10:55:13 +0900
From: [email protected]
To: [email protected]
Message-ID: <defaultdomain.mail>
Subject: test
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
(Message)
test
I, [2016-08-19T10:55:13.430023 #3782] INFO -- : Completed 500 Internal Server Error in 17ms (ActiveRecord: 2.0ms)
F, [2016-08-19T10:55:13.431110 #3782] FATAL -- :
Errno::ECONNREFUSED (Connection refused - connect(2) for "localhost" port 25):
app/controllers/tasks_controller.rb:41:in `create'
로그/production.log :이어야에
설정/환경/development.rb
config.action_mailer.default_url_options = { host: 'localhost:3000' }
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
authentication: :plain,
user_name: '[email protected]',
password: 'xxxxx'
}
코딩을 벌금. 그래서, 나는 몇몇 서버 설정이 postfix의 설치로 인해 변경되었다고 생각합니다. "냠 비둘기장을 제거" http://tipszone.jp/20120521_mail_server/
그리고, 나는 "냠 지우기 접미사"에 의해 그것을 제거, "RF RM은/등/후위"및 "
는 내가의 webiste에 기록 된 절차에 따라 접미사를 설치 rm -rf/etc/dovecot "을 입력하십시오. 그 후 "재부팅"및 "서비스 httpd 다시 시작"을 수행했습니다."/ etc/sysconfig/iptables"도 이전과 같습니다.