Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have redmine 1.4.1 installed on my debian server. configuration.yaml contains the following

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: true
      enable_starttls_auto: true
      address: "smtp.yandex.ru"
      port: 465
      domain: "my.domain.com" 
      authentication: :plain
      user_name: "Username"
      password: "Password"

When redmine tries to send an email I can see this in nginx logs

[info] 23788#0: *1 client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 37.57.17.197, server: redmine.my.domain.com, request: "GET /admin/test_email HTTP/1.1", upstream: "passenger:unix:/passenger_helper_server:", host: "redmine.my.domain.com", referrer: "http://redmine.my.domain.com/settings"

I have tried different smtp servers but the results were the same.

I applied these rules to iptables but that helped neither.

 iptables -A INPUT -p tcp --dport 465 -m state --state NEW,ESTABLISHED -j ACCEPT
 iptables -A OUTPUT -p tcp --sport 465 -m state --state ESTABLISHED -j ACCEPT
share|improve this question

1 Answer 1

First check if the port is open by (assuming that smtp.yandex.ru is your SMTP server):

telnet smtp.yandex.ru 465

Then I'd suggest you to check the problem using tcpdump:

First phase, check the communication between the servers (use -i eth0 if necessary):

sudo tcpdump -nl host smtp.yandex.ru and port 465

Then if remote host responding and there is TCP/IP communication, check the actual data received from the server (if you find any error).

sudo tcpdump -nl -s1500 -w- src host smtp.yandex.ru | strings

If this doesn't help, please update your question with more details using above methods.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.