## TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: smtp.office365.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: test@example.fr
DISCOURSE_SMTP_PASSWORD: password
DISCOURSE_SMTP_AUTHENTICATION: login
DISCOURSE_SMTP_ENABLE_START_TLS: false
Any idea how to fix the problem ?
Another config:
## TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: smtp.office365.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: test@example.fr
DISCOURSE_SMTP_PASSWORD: password
DISCOURSE_SMTP_AUTHENTICATION: login
DISCOURSE_SMTP_ENABLE_START_TLS: true
I get the following error:
550 5.7.60 SMTP; Client does not have permissions to send as this sender
The problem is from Discourse, because I can test with swaks and it’s working
Not Suggesting that You use office365 for SMTP but it seems like DISCOURSE_SMTP_AUTHENTICATION: login isn’t required … maybe try commenting that out and try again with STARTTLS set to True?
Okay the problem is now fixed. Huge mistake from my side : the email from Admin → settings → notification email was not the same from the smtp username.
Maybe a check should be made to prevent user to makes this mistake
but it seems like DISCOURSE_SMTP_AUTHENTICATION: login isn’t required
Sadly this solution is not working for me (I also tried to escape the password). I tried it with this SMTP setting problem with Office365 - #5 by ianwhite one which is working. But not everybody gets E-Mails…
If some people get mail then it’s the fault of office365, or their mail provider. The others should check their spam folder, though if they use a service life office365 it will silently drop mail that it thinks is spam.
Sounds like the address you are sending from is not one that the mail server supports. There is a line at the bottom of app.yml that week let you set the notification address. (you can set it in sure settings if you’re logged in)
Or maybe they have VERP enabled so the email address is replies+{key}@example.com instead of the authorized noreply@example.com That was the issue I’ve faced in past while trying to send mails from my own mail server. It’s usually easy to fix though.
بعض التعليمات المحدثة لأي شخص يواجه صعوبة مع Office 365 والتسليم المباشر
انتقل إلى مركز إدارة Microsoft
انقر فوق “الإعدادات” ثم “المجالات”
انقر فوق “إضافة مجال”
اتبع التعليمات التي تظهر على الشاشة لإضافة عنوان URL لمنتدى الخاص بك (مثال: forum:yourlinks.com)
بمجرد إكمال الخطوات المذكورة أعلاه والتحقق من صحة نظام أسماء النطاقات (DNS)، يمكنك الآن إنشاء صندوق بريد باستخدام هذا النطاق الفرعي
انقر فوق “المستخدمون” ثم “المستخدمون النشطون”
انقر فوق “إضافة مستخدم”
قم بإنشاء صندوق البريد لمنتدى الخاص بك (مثال: noreply@forum.yourlinks.com) يجب أن يتطابق نطاق صندوق البريد مع اسم المضيف الذي يعمل منه المنتدى
انقر فوق “الترخيص والتطبيقات”
قم بتعيين ترخيص Exchange Online (الخطة 1) لصندوق البريد هذا (10,000 رسالة يوميًا، حد 30 رسالة/دقيقة). يلزم وجود ترخيص مرفق بصندوق البريد لغرض التسليم المباشر. في وقت كتابة هذا التقرير، تبلغ التكلفة 4.00 دولار أمريكي شهريًا أو 5.10 دولار كندي | إذا كنت بحاجة إلى حد أعلى أو حد زمني أقصر، فهناك خطط أخرى متاحة
انقر فوق “البريد” ثم “إدارة تطبيقات البريد”
قم بتمكين “SMTP المصادق عليه”
انقر فوق “حفظ التغييرات”
انتقل إلى بوابة Azure الخاصة بك
استعرض للوصول إلى الدليل النشط الخاص بك
حدد “الخصائص” في الشريط الجانبي الأيسر، أسفل “إعدادات المستخدم” مباشرةً
حدد “إدارة إعدادات الأمان”
قم بتعيين “إعدادات الأمان” إلى “معطل”
انقر فوق “حفظ”
عد إلى “المستخدمون” > “المستخدمون النشطون”
انقر فوق “المصادقة متعددة العوامل”
قم بتعطيل المصادقة متعددة العوامل (MFA) على صندوق البريد قيد الاستخدام
صندوق البريد جاهز الآن للاستخدام بواسطة Discourse الخاص بك.
قد لا يكون تعطيل الإعدادات الافتراضية للأمان ضروريًا بعد الآن مع فرض المصادقة متعددة العوامل (MFA). إذا قمت بتمكين وفرض المصادقة متعددة العوامل (MFA) على حساب M365، يمكنك الانتقال إلى صفحة إعداد المصادقة متعددة العوامل (MFA) الخاصة بالحساب وإضافة كلمة مرور تطبيق لاستخدامها وتجاوز المصادقة متعددة العوامل (MFA). لقد نجحت في ذلك مع مستخدم مرخص له بـ M365 Business Basic مع فرض المصادقة متعددة العوامل (MFA) وتمكين SMTP AUTH والإعدادات الافتراضية للأمان. كان عليّ فقط زيادة مهل فتح وقراءة SMTP بسطرين إضافيين. قد يكون 30 مفرطًا، لكن 5 كان قليلاً جدًا.