1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[Bug] Failed to send test email in alert setting when using custom username

Open orilights opened this issue 1 month ago • 4 comments

Contact Information

No response

1Panel Version

v2.0.12

Problem Description

告警设置中,使用 resend smtp 服务发送测试邮件失败,报错 501 Error: Bad sender address syntax /api/v2/alert/config/test

{
    "code": 500,
    "message": "服务内部错误: setting sender failed: 501 Error: Bad sender address syntax",
    "data": null
}

使用完全一致的参数,本地 Python 以及 UptimeKuma 都可以发送成功,没看到面板有输出相关日志,不清楚该如何排查

Image Image

Steps to Reproduce

告警设置中,使用 resend smtp 服务发送测试邮件

The expected correct result

No response

Related log output


Additional Information

No response

orilights avatar Oct 28 '25 09:10 orilights

Image @orilights 可以添加下我的企业微信,了解一下详细的信息

lan-yonghui avatar Oct 28 '25 09:10 lan-yonghui

  1. 用户名是和密码一起用来登录的;
  2. 如果没有填写用户名,那么发信地址就将作为用户名;
  3. 如果填写了用户名,那么发信地址可以任意填写

发信成功:

Image

收信成功:

Image

综上所述,用户名不应该填写resend。

pooneyy avatar Oct 30 '25 02:10 pooneyy

@pooneyy @orilights 第三点,发信地址不可以随意填写,需要填写合法的邮箱地址。 这个问题是有个参数给错了,之前没有用户名,默认使用的就是发信地址,后面增加了用户名后,传参为用户名了,导致邮件服务发信地址错误了!

lan-yonghui avatar Oct 30 '25 02:10 lan-yonghui

@pooneyy @orilights 第三点,发信地址不可以随意填写,需要填写合法的邮箱地址。 这个问题是有个参数给错了,之前没有用户名,默认使用的就是发信地址,后面增加了用户名后,传参为用户名了,导致邮件服务发信地址错误了!

确实,是我的问题。不好意思

pooneyy avatar Oct 30 '25 03:10 pooneyy

v2.0.13 版本已发布。

wanghe-fit2cloud avatar Nov 20 '25 03:11 wanghe-fit2cloud