Configuring Gmail results in 'Failed to issue MAIL command: 555 5.5.2 Syntax error' #15071

Open
opened 2025-11-02 11:29:30 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @KelchtermansBram on GitHub (Oct 30, 2025).

Description

I tried configuring my Google Workspace & generic gmail account in the Gitea mailer config by following the documentation provided at https://docs.gitea.com/administration/email-setup

However, when sending a test email I get the following error:
failed to issue MAIL command: 555 5.5.2 Syntax error, cannot decode response. For more information, go to 5.5.2 https://support.google.com/a/answer/3221692 and review RFC 5321 5.5.2 specifications. 4fb4d7f45d1cf-64068f74a56sm1990428a12.15 - gsmtp

Using the exact same credentials in another application works as a charm.

Things I've tried

  • Try smtp+starttls and smtps
  • Use both a generic gmail account and a google workspace account
  • Changing the default name (Gitea: Git with a cup of tea) to my own name and/or email
  • Manually send an email by using swaks from the host machine (Gitea is running in a docker on that machine)

Am I doing something wrong or is this a global issue?

Gitea Version

1.25.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.49.1

Operating System

Ubuntu

How are you running Gitea?

Selfhosted with Docker

Database

None

Originally created by @KelchtermansBram on GitHub (Oct 30, 2025). ### Description I tried configuring my Google Workspace & generic gmail account in the Gitea mailer config by following the documentation provided at https://docs.gitea.com/administration/email-setup However, when sending a test email I get the following error: `failed to issue MAIL command: 555 5.5.2 Syntax error, cannot decode response. For more information, go to 5.5.2 https://support.google.com/a/answer/3221692 and review RFC 5321 5.5.2 specifications. 4fb4d7f45d1cf-64068f74a56sm1990428a12.15 - gsmtp` Using the exact same credentials in another application works as a charm. **Things I've tried** - Try `smtp+starttls` and `smtps` - Use both a generic gmail account and a google workspace account - Changing the default name (`Gitea: Git with a cup of tea`) to my own name and/or email - Manually send an email by using `swaks` from the host machine (Gitea is running in a docker on that machine) Am I doing something wrong or is this a global issue? ### Gitea Version 1.25.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.49.1 ### Operating System Ubuntu ### How are you running Gitea? Selfhosted with Docker ### Database None
GiteaMirror added the type/bugtype/upstream labels 2025-11-02 11:29:30 -06:00
Author
Owner

@dangjinghao commented on GitHub (Oct 31, 2025):

Hi, did you test this in Gitea 1.24.7? Based on my similar issue #35788, it works. If so, it's possible that the change is related to the go-mail dependency update in 1.25.0.

@dangjinghao commented on GitHub (Oct 31, 2025): Hi, did you test this in Gitea 1.24.7? Based on my similar issue #35788, it works. If so, it's possible that the change is related to the `go-mail` dependency update in 1.25.0.
Author
Owner

@dangjinghao commented on GitHub (Oct 31, 2025):

Would you mind testing this again following the steps in my comment? I think it would be related.

@dangjinghao commented on GitHub (Oct 31, 2025): Would you mind testing this again following the steps in [my comment](https://github.com/go-gitea/gitea/issues/35788#issuecomment-3474157785)? I think it would be related.
Author
Owner

@lunny commented on GitHub (Nov 1, 2025):

Created an issue upstream https://github.com/wneessen/go-mail/issues/504

@lunny commented on GitHub (Nov 1, 2025): Created an issue upstream https://github.com/wneessen/go-mail/issues/504
Author
Owner

@wneessen commented on GitHub (Nov 2, 2025):

Please see https://github.com/wneessen/go-mail/issues/504#issuecomment-3477890515

TL;DR:
This is an issue with the Gitea implementation, not a go-mail bug. Gitea uses the low-level SMTP package of go-mail, which had a breaking change (to fix a vulnerability) in the 0.7.1 (and corresponding 0.7.2) release. Gitea either needs to adjust their code for the from address handling when talking to the SMTP server or use the go-mail Client instead, which would make the change for the underlying SMTP package transparent to the user.

@wneessen commented on GitHub (Nov 2, 2025): Please see https://github.com/wneessen/go-mail/issues/504#issuecomment-3477890515 TL;DR: This is an issue with the Gitea implementation, not a go-mail bug. Gitea uses the low-level SMTP package of go-mail, which had a breaking change (to fix a vulnerability) in the 0.7.1 (and corresponding 0.7.2) release. Gitea either needs to adjust their code for the from address handling when talking to the SMTP server or use the go-mail `Client` instead, which would make the change for the underlying SMTP package transparent to the user.
Author
Owner

@luronumen commented on GitHub (Nov 2, 2025):

Hi Guys,

Could you please release a fix for this issue as soon as possible? My developers aren't being notified by email because this issue, and downgrading to version 1.24.7 could be problematic.

Thank you all in advance!

@luronumen commented on GitHub (Nov 2, 2025): Hi Guys, Could you please release a fix for this issue as soon as possible? My developers aren't being notified by email because this issue, and downgrading to version 1.24.7 could be problematic. Thank you all in advance!
Author
Owner

@Molive-0 commented on GitHub (Nov 2, 2025):

Also seeing this issue.

As a workaround we are going to try routing through sendmail.

@Molive-0 commented on GitHub (Nov 2, 2025): Also seeing this issue. As a workaround we are going to try routing through sendmail.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15071