Gmail SMTP Relay Setup not working

Hi Folks,

I’ve installed discourse on an Ubuntu 18.04 by this guide (it’s with Ubuntu 16.04, but I think its quite the same):

Then I setup the email configuration like here discribed:
https://crunchify.com/how-to-setup-email-for-discourse-forum-with-google-apps-smtp-relay-right-way/

Note: It dont worked for me to apply just a IP range, only full IP-Address worked.

But I still dont get emails working. When I do the doctor test, it says:

==================== MAIL TEST ====================
...
...
SMTP server connection successful.
Sending to info@likamundi-lernen.de. . . 
Sending mail failed.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DNS PROBLEM ====================
This server reports NOT FOUND, but discourse.likamundi.de reports Discourse 2.4.0.beta2 .
This suggests that you have a DNS problem or that an intermediate proxy is to blame.
If you are using Cloudflare, or a CDN, it may be improperly configured.

I also tried to set “Allowed senders” in the gmail suite to “all”, but that also not helped.

And of curse, if I try to setup the admin account, I just dont get a mail…

Can anybody help me here, cant be possible that thats so hard to setup ^^

Kind regards,
Zacharias

Relaying through Gmail is a violation of their Terms of Service, so we do not support it. We recommend using a service like Mailgun.

Hmm. So maybe you’ve got a reverse proxy? Since

You’re in good shape there.

If you’re paying for Gsuite (and not Gmail) it’s not a violation of their TOS to have Discourse send mail, but it’s still a huge pain and you can’t get much help here. If you have a credit card your life will be much easier if you go with Mailgun (or similar).

도움을 드리기엔 다소 늦었을 수도 있지만, GSuite의 smtp-relay를 사용하여 Discourse 이메일을 전송할 수 있다는 것을 확인해 드릴 수 있습니다.

아래는 인증 없이(IP 주소만 사용) smtp-relay(Gmail 앱 설정에서)를 사용하는 설정입니다. 먼저 말씀하신 대로, 앱 설정을 "지정된 IP 주소에서만 메일 수락"으로 구성하고, Discourse 서버의 주소를 추가해야 합니다.

Discourse 측의 설정은 다음과 같습니다.

DISCOURSE_SMTP_ADDRESS: smtp-relay.gmail.com      
DISCOURSE_SMTP_PORT: 587                        
DISCOURSE_SMTP_USER_NAME:    
DISCOURSE_SMTP_PASSWORD:     

핵심적인 부분이자 제가 약 1시간 동안 헤매게 된 이유는, 사용자 이름과 비밀번호 변수를 지정하되 빈 값으로 두어야 한다는 점입니다. 그 외의 값(없음, ‘’, 등)은 작동하지 않습니다.

아니요, 이 방법은 작동하지 않습니다. 그리고 의도적으로 깎아내리려는 건 아니지만, 도메인과 메일 서버를 모두 요구하는 것은 정말 끔찍한 플랫폼 아이디어입니다. 대부분의 도메인 제공업체에서 DNS를 변경하면 로컬 메일 서버가 엉망이 되거든요. 4시간째 이걸 설치하려고 애쓰고 있습니다.

우회 방법으로 도와주셔서 감사합니다! 작동하는 것을 확인했습니다 :slight_smile:

방금 이 방법으로 잘 작동했어요