Mailer reply address

Hi
I set up the mailer for our gitea platform and everything works fine.
The smt mailer is setup with:

FROM = test@example.com

The only issue I have is that when, for example, I add a comment to an issue, everybody watching receives an email from:
My Name test@example.com

I would prefer that the email sender name is either something else or hat it uses my email address instead of the static one from the mailer.
Is there something I can change in the configuration?

Thanks

2 Likes

Hey @tim,

did you ever find a solution for this?

We are using Gitea to cooperate on a shared project, and recently gmail started flagging the emails sent by Gitea as being potential spoofed emails because the name in the from-line does not accord to the email address that Gitea is using when sending the emails.

Best regards,
Lieven

I believe you can specify a display name in the FROM option itself, at least thatā€™s what the docs claim in Config Cheat Sheet.

Something like FROM = Example Gitea <gitea@example.com> might work, or it may need special escaping (not certain).

Hey @jake

thank you for the fast response. The setting you mention works as expected when you send a ā€˜test emailā€™ from the ā€˜admin/configurationā€™ web page. It does however not work when a user adds a comment to a ticket. Then the name of the user is filled into the ā€˜fromā€™ field.

Best regards,
Lieven

Hello all,

a short follow-up:

the configuration settings for the mailer that I am using are:

GITEA__mailer__ENABLED=true
GITEA__mailer__MAILTER_TYPE=smtp
GITEA__mailer__SMTP_ADDR=my-server-url.org
GITEA__mailer__SMTP_PORT=25
GITEA__mailer__FROM=noreply@my-server-url.org
GITEA__mailer__ENVELOPE_FROM=<>

When I send a mail using the test button in the admin page the mail header looks as expected like:

From: noreply@my-server-url.org

When a mail is sent because a user has updated a ticket, the mail header unexpectedly looks like:

From: "Firstname Lastname" <noreply@my-server-url.org>

Is there a way to avoid that Gitea inserts the ā€œFirstname Lastnameā€ when creating an email?

As stated above, the current behaviour is causing the Google Workspace spoofing attempt detector to raise alerts because the Firstname Lastname does not correspond to the mail address that Gitea is configured to use in the ā€˜fromā€™ line of the email header.

Such alert raised by Google looks like this:

This Gmail potential employee spoofing alert is to inform you that a sender has sent messages that may be spoofing the employee names in your domain.

The alert details include:

Summary: Firstname Lastname <noreply@my-server-url.org> sent 1 messages that may be spoofing users with a similar display name in your domain. There were 1 recipients.
Date: dinsdag, 30 mei 2023 09:57:35 (UTC)
Actor: Firstname Lastname <noreply@my-server-url.org>
Total messages: 1
Received by: another-user@workdomain.org
Severity: MEDIUM