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: 184.108.40.206, 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