Sending email failed with SMTPS port 465

Hi Team,

Using email service from godaddy and smtp ssl port 465 in config, but sending mail fails with
Job exception: end of file reached.

For me 465 works with email client such as thunderbird. What can be done to make email work with discourse on port 465.
Running SMTP on other port such as 3535 works well. If I go with non secure port will security of my email contents and credentials get compromised?

Regards
Manish

This sounds like a problem with your mail provider or the server running Discourse (such as a firewall issue). It is not a problem with Discourse itself.

Also note that port 465 hasn’t been for SMTPS for so long that the IETF has removed its registration as a well-known port. You should use port 25 or 587 with STARTTLS.

Hi Matt,

I am able to telnet port 465 from discourse server and no firewall is configured for now.
Email providers still supports 465 for secure connection for client which does not support STARTTLS. However that’s not the case here, so I can move to port 25 with STARTTLS on.

Regards
Manish

Sad to here this.
My email service provider does not support for port 587.

Your ESP needs to be dragged, kicking and screaming, into the 21st century.

4 إعجابات

I have been googling for this, to see if I should use port 465 or not.

Can you confirm as of 2018, if the recommended and safe settings is to use port 587 with STARTTLS (DISCOURSE_SMTP_ENABLE_START_TLS env for dockers) ?

Sendgrid still offers port 465 “for SSL connections” as they say. I was thinking in using it.

Sendgrid use 587 too. Use 587 with starttls. TLS is effectively the successor to SSL.

إعجابَين (2)

There’s a January 2018 IETF RFC which recommends use of port 465 for “implicit” TLS. A motivation for this is the increasing trend for mandatory encryption, which renders STARTTLS somewhat redundant. RFC 8314 - Cleartext Considered Obsolete: Use of Transport Layer Security (TLS) for Email Submission and Access

إعجاب واحد (1)

Have there been any updates? My email provider also requires that the client automatically establish a TLS connection on connect on port 465.

How do I tell Discourse to use this option?

To be precise, in [swaks](https://linux.die.net/man/1/swaks) this is called --tlsc

--tlsc, --tls-on-connect
Initiate a TLS connection immediately on connection. Following common convention, if this option is specified the default port changes from 25 to 465, though this can still be overridden with the --port option.

I think the following is related: a never completed PR for Ruby’s action mailer describes how the action mailer needs to be configured. Specifically, the options tls and ssl need to be added. In Discourse, this could be in production.rb here

PS: I submitted a PR with a proposed fix which can also be used as a work-around

إعجابَين (2)

هل هناك أي حلول عملية لإرسال البريد الإلكتروني عبر SMTPS على المنفذ 465؟ لا، “غيّر مزود خدمة البريد الإلكتروني الخاص بك” و “استخدم الإرسال 587” وما شابه ذلك ليست حلولاً للمشكلة قيد البحث :wink:

حلول عملية؟ لا… إنها سياسة شائعة جدًا للإجبار على استخدام 587.

إذًا، ما هي المشكلة؟

هل تقصد من جانب ESP؟ بالتأكيد، ولكن ليس من جانب العميل (هنا خادم Discourse). ما زلت أتحقق وأعيد التحقق من الخيارات، لذا لم يتضح بعد أنه “لا يعمل” بالنسبة لي، ولكني آمل ألا يحاول أحد فرض 587 على جانب العميل هنا، أليس كذلك؟

أردت فقط الإشارة إلى هذا الأمر نظرًا لأنه يبدو أنه أصبح سوء فهم شائع - 587 ليس “المستقبل” - بل TLS الضمني عبر 465 هو.

لقد قادني هذا المنشور إلى هذا الاكتشاف

وبعد قراءة وثيقة RFC الفعلية من عام 2018، يتضح الأمر - ليس أن STARTTLS هو الطريق إلى الأمام، بل أن SMTPS ليس هو الطريق إلى الأمام، وأن TLS الضمني عبر المنفذ 465 (أو 587) هو ما يجب على المسؤولين اختياره للمضي قدمًا.

لا ينبغي تصنيف دعم TLS عبر 465 (ومن المحتمل تقليل أولويته) على أنه “الحفاظ على التوافق مع الإصدارات السابقة” أو أي مفهوم مشابه.

آلية STARTTLS على المنفذ 587 منتشرة على نطاق واسع نسبيًا بسبب الوضع مع المنفذ 465 (المناقش في القسم 7.3. يختلف هذا عن خدمات IMAP و POP حيث يكون TLS الضمني أكثر انتشارًا على الخوادم من STARTTLS. من المرغوب فيه ترحيل البروتوكولات الأساسية التي تستخدمها برامج MUA إلى TLS الضمني بمرور الوقت، من أجل الاتساق بالإضافة إلى الأسباب الإضافية التي تمت مناقشتها في الملحق أ. ومع ذلك، لزيادة استخدام التشفير للإرسال، من المرغوب فيه دعم كلتا الآليتين لإرسال الرسائل عبر TLS لفترة انتقالية تمتد لعدة سنوات. ونتيجة لذلك، يجب على العملاء والخوادم تنفيذ كل من STARTTLS على المنفذ 587 و TLS الضمني على المنفذ 465 لهذه الفترة الانتقالية. لاحظ أنه لا يوجد فرق كبير بين خصائص الأمان لـ STARTTLS على المنفذ 587 و TLS الضمني على المنفذ 465 إذا كانت التطبيقات صحيحة وإذا تم تكوين كل من العميل والخادم لطلب التفاوض الناجح على TLS قبل إرسال الرسالة.

الانتقال ليس إلى submissions عبر 587 عبر STARTTLS، بل إلى submissions عبر TLS الضمني على المنفذ 465 (على عكس SMTPS عبر المنفذ 465 الذي تم إيقافه الآن).

4 إعجابات

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.