Gogs: Mailer can't send mail

Created on 12 Nov 2016  ·  3Comments  ·  Source: gogs/gogs

  • Gogs version (or commit ref): 0.9.99.0903
  • Git version: 2.10.2
  • Operating system: Debian stretch
  • Database:

    • [ ] PostgreSQL

    • [x] MySQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gogs.io:

    • [ ] Yes (provide example URL)

    • [x] No

    • [ ] Not relevant

  • Log gist:
    Gogs:
    Fail to send test email to '[email protected]': gomail: could not send email 1: Auth: 535 5.7.8 Error: authentication failed: PDEwOTgxNjA2Nzg2MzkwNjQuMTQ3ODk3MDMwNEBwYXN0YS54eHguZGU+ (Base64 string looks different original, altered for domain-privacy.)
    Postfix:
    Nov 12 18:05:04 pasta postfix/smtpd[15950]: connect from mail.xxx.de[2a02:c200:xxx]
    Nov 12 18:05:04 pasta postfix/smtpd[15950]: Anonymous TLS connection established from mail.xxx.de[2a02:c200:xxx]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
    Nov 12 18:05:06 pasta postfix/smtpd[15950]: warning: mail.xxx.de[2a02:c200:xxx]: SASL CRAM-MD5 authentication failed: PDEwOTgxNjA2Nzg2MzkwNjQuMTQ3ODk3MDMwNEBwYXN0YS54eHguZGU+
    Nov 12 18:05:06 pasta postfix/smtpd[15950]: disconnect from mail.xxx.de[2a02:c200:xxx] ehlo=2 starttls=1 auth=0/1 quit=1 unknown=0/1 commands=4/6

    Description

This is my mailer-specific config:
[mailer]
ENABLED = true
SEND_BUFFER_LEN = 100
SUBJECT = %(APP_NAME)s
HOST = mail.xxx.de:25
DISABLE_HELO = false
HELO_HOSTNAME =
SKIP_VERIFY = false
USE_CERTIFICATE = false
CERT_FILE = custom/mailer/cert.pem
KEY_FILE = custom/mailer/key.pem
FROM = "Git" <[email protected]>
USER = [email protected]
PASSWD = yyy
ENABLE_HTML_ALTERNATIVE = false

Mailserver supports cram-md5:
250-mail.xxx.de
250-PIPELINING
250-SIZE 40000000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5 NTLM
250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5 NTLM
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Password is 100% correct, tested with different clients. For me it looks like he doesn't even try to auth at all. Does anyone have an idea what's wrong here?

Thanks in advance!

💊 bug 🙇‍♂️ help wanted

Most helpful comment

Hi @zoh48gz04, does your password contain any special characters? It might be the problem. In my experience it is enough to put the password into single quotes. Could you try it please? If it fixes it for you I could create a PR for docs change, it is good to mention it somewhere.

All 3 comments

@issuehuntfest has funded $20.00 to this issue. See it on IssueHunt

Hi @zoh48gz04, does your password contain any special characters? It might be the problem. In my experience it is enough to put the password into single quotes. Could you try it please? If it fixes it for you I could create a PR for docs change, it is good to mention it somewhere.

That did the trick!

Thank you very much. :D

PR created, docs#241

Was this page helpful?
0 / 5 - 0 ratings