2013-02-21 2 views
5

redmine에서 문제를 생성/편집 할 때 알림 메일이 두 번 전송됩니다. 왜? Redmine이 메일을 두 번 보냅니다.

이 나는 ​​레드 마인 구성 파일 "설정/configuration.yml"로보고하고 "email_delivery :"제거하려 섹션에서 "생산"이미 "기본"에 정의 된 하나이 있기 때문에

도 "관리> 설정> 이메일 알림"의 "테스트 메일 보내기"기능을 사용하면 테스트 이메일이 두 번 전송됩니다.

그러나 이것은 "sendmail"구성을 사용할 때만 발생합니다. ": smtp"를 사용하고 SMTP 서버를 설정하면 메일이 올바르게 전송됩니다. 명령 줄 "메일"명령을 사용할 때 메일도 한 번만 전송됩니다.

이 내 configuration.yml 같은 모습입니다 :

production: 
    email_delivery: 
    delivery_method: :sendmail 
# ... comments ... 
default: 
    # Outgoing emails configuration (see examples above) 
    email_delivery: 
    delivery_method: :sendmail 
# ... other stuff 

큐메일이다 사용되는 메일러.

Feb 21 10:52:56 admin qmail-queue-handlers[12443]: Handlers Filter before-queue for qmail started ... 
Feb 21 10:52:56 admin qmail-queue-handlers[12443]: [email protected] 
Feb 21 10:52:56 admin qmail-queue-handlers[12443]: [email protected] 
Feb 21 10:52:56 admin qmail-queue-handlers[12443]: [email protected] 
Feb 21 10:52:56 admin qmail: 1361440376.142458 new msg 5758988 
Feb 21 10:52:56 admin qmail: 1361440376.142504 info msg 5758988: bytes 2348 from <[email protected]> qp 12446 uid 10028 
Feb 21 10:52:56 admin qmail: 1361440376.143705 starting delivery 34398: msg 5758988 to local [email protected] 
Feb 21 10:52:56 admin qmail: 1361440376.143730 status: local 1/10 remote 0/20 
Feb 21 10:52:56 admin qmail: 1361440376.143735 starting delivery 34399: msg 5758988 to local [email protected] 
Feb 21 10:52:56 admin qmail: 1361440376.143738 status: local 2/10 remote 0/20 
Feb 21 10:52:56 admin qmail-local-handlers[12447]: Handlers Filter before-local for qmail started ... 
Feb 21 10:52:56 admin qmail-local-handlers[12448]: Handlers Filter before-local for qmail started ... 
Feb 21 10:52:56 admin qmail-local-handlers[12448]: [email protected] 
Feb 21 10:52:56 admin qmail-local-handlers[12448]: [email protected] 
Feb 21 10:52:56 admin qmail-local-handlers[12448]: mailbox: /var/qmail/mailnames/web-consulting.at/kraft 
Feb 21 10:52:56 admin qmail-local-handlers[12447]: [email protected] 
Feb 21 10:52:56 admin qmail-local-handlers[12447]: [email protected] 
Feb 21 10:52:56 admin qmail-local-handlers[12447]: mailbox: /var/qmail/mailnames/web-consulting.at/kraft 
Feb 21 10:52:56 admin qmail: 1361440376.159507 delivery 34399: success: did_0+0+2/ 
Feb 21 10:52:56 admin qmail: 1361440376.159542 status: local 1/10 remote 0/20 
Feb 21 10:52:56 admin qmail: 1361440376.160164 delivery 34398: success: did_0+0+2/ 
Feb 21 10:52:56 admin qmail: 1361440376.160248 status: local 0/10 remote 0/20 
Feb 21 10:52:56 admin qmail: 1361440376.160283 end msg 5758988 

루비 ActionMailer 이미 두 번 "[email protected]"의 원인이되는 것 같다 :이 테스트 메일을 보내기위한 mail.info의 출력입니다.

아이디어가 있으십니까?

답변

3

이전 버전의 sendmail이 있습니까?

config.action_mailer.delivery_method = :sendmail 
    config.action_mailer.sendmail_settings = { 
    :location => '/usr/sbin/sendmail', 
    :arguments => "-i" 
    } 

은 나를 위해, 나는 http://stefanwienert.net/blog/2011/11/17/rails-schickt-mails-zweimal-wenn-man-sendmail-verwendet-slash-rails-sent-mails-twice-when-using-sendmail/

+0

내 말에 작동하지 않았다 문제를 이중 전송을

(참조)를 해결하기 위해 -i와 sendmail을 사용했다. 캐시를 지우거나 Redmine을 나중에 다시 컴파일해야합니까? – Mateng

+0

그것은 효과가있다, 나는 단지 1 시간을 기다렸다. 그러나 이러한 변경 사항을 방지하기 위해 구성을 다시로드하는 방법을 잘 모르겠습니다. – Mateng

+0

그것은 작동하지만 난 그것을 좋아 써야했다 : config.action_mailer.delivery_method = 센드 메일 config.action_mailer.sendmail_settings을 : 위치 : "는/usr/빈/센드 메일" 인수 : "-i" 사실 문제는 redmine이 헤더에 "To :"를 생성하고 "sendmail"을 호출 할 때 이메일 주소를 설정하는 것입니다. "-t"스위치와 일부 특정 버전 이전의 접미사 때문에 원래의 센드 메일에 대해서는 문제가 없습니다. 그러나 우리는 단순히 "-t"를 무시하는 qmail을 사용하고 있습니다. – kraftb

관련 문제