Dopo una nuova installazione pulita, non sono riuscito a far funzionare la posta elettronica. Ho seguito ogni passaggio della guida alla risoluzione dei problemi qui
Sto utilizzando Zoho Mail
Le impostazioni di posta sono piuttosto semplici:
DISCOURSE_SMTP_ADDRESS: smtp.zoho.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: forum@blockchainofthings.com
DISCOURSE_SMTP_PASSWORD: "redeacted"
DISCOURSE_SMTP_ENABLE_START_TLS: true # (opzionale, valore predefinito true)
DISCOURSE_SMTP_DOMAIN: blockchainofthings.com
DISCOURSE_NOTIFICATION_EMAIL: sys@blockchainofthings.com
Ho rimosso il commento dalla sezione dei comandi personalizzati.
- exec: rails r "SiteSetting.notification_email='forum@blockchainofthings.com'"
Posso fare telnet al server SMTP dalla mia istanza EC2 su cui è installato Discourse senza problemi.
Eseguendo ./discourse-doctor ottengo:
==================== MAIL TEST ====================
Per un test robusto, ottieni un indirizzo da http://www.mail-tester.com/
Oppure invia semplicemente un messaggio di prova a te stesso.
Indirizzo email per il test della posta? ('n' per saltare) [sys@blockchainofthings.com]: sue@rightclick.com
Invio della posta a sue@rightclick.com...
Test dell'invio a sue@rightclick.com utilizzando smtp.zoho.com:587, nome utente:forum@blockchainofthings.com con autenticazione semplice.
Connessione al server SMTP riuscita.
Invio a sue@rightclick.com...
Invio della posta fallito.
fine del file raggiunta
Il log contiene una frase strana: An attempt was to change notification_email SiteSetting to forum@blockchainofthings.com however it is shadowed so this will be ignored! (È stato tentato di modificare l’impostazione notification_email di SiteSetting in forum@blockchainofthings.com, ma è oscurata, quindi ciò verrà ignorato!). Potrebbe essere questo il problema, ma non sono sicuro del perché o di come risolverlo.
Ecco un estratto più ampio del log:
An attempt was to change notification_email SiteSetting to forum@blockchainofthings.com however it is shadowed so this will be ignored!
Creating scope :open. Overwriting existing method Poll.open.
Started GET "/privacy" for 18.204.103.32 at 2021-09-15 20:22:27 +0000
Processing by StaticController#show as */*
Parameters: {"id"=>"privacy"}
Rendered static/show.html.erb within layouts/crawler (Duration: 7.7ms | Allocations: 963)
Rendered layout layouts/crawler.html.erb (Duration: 41.8ms | Allocations: 8467)
Completed 200 OK in 114ms (Views: 45.2ms | ActiveRecord: 0.0ms | Allocations: 18560)
Started GET "/privacy" for 18.204.103.32 at 2021-09-15 20:22:27 +0000
Processing by StaticController#show as */*
Parameters: {"id"=>"privacy"}
Rendered static/show.html.erb within layouts/crawler (Duration: 5.2ms | Allocations: 931)
Rendered layout layouts/crawler.html.erb (Duration: 26.5ms | Allocations: 6343)
Completed 200 OK in 59ms (Views: 30.1ms | ActiveRecord: 0.0ms | Allocations: 12955)
Rendered layouts/email_template.html.erb (Duration: 0.8ms | Allocations: 273)
Delivered mail ac1148f5-a79f-4892-8982-8e6f512a3b04@forum.blockchainofthings.com (1462.1ms)
Job exception: end of file reached
Creating scope :open. Overwriting existing method Poll.open.
Rendered layouts/email_template.html.erb (Duration: 2.1ms | Allocations: 487)
Delivered mail 5e74a41c-48ee-4e14-b669-091665840076@forum.blockchainofthings.com (544.7ms)
Qualsiasi aiuto su come risolvere questo problema su una nuova installazione sarebbe molto apprezzato.