go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.33k stars 5.43k forks source link

Incoming mail didn't work on issue creation #23651

Open inMetaNetworks opened 1 year ago

inMetaNetworks commented 1 year ago

Description

Hi,

i tried the new incoming mail feature and it's very nice and working good for me. Except you can't answer to issues when they are created. You can only reply on comments with mail. There is no token generated on issue creation. v1.19/services/mailer/mail.go#L335

I'm not sure if it's a bug or design. For the background: I "misuse" gitea as an dead simple helpdesk for some people and it's great! Simple setup and nearly zero maintenance, ad/ldap connectivity and so on. And the new incoming mail feature is awesome for that!

Gitea Version

1.19.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian 11

How are you running Gitea?

Local installations on Debian Bullseye, systemd, pgsql.

Database

PostgreSQL

D-ominik commented 1 year ago

The bug is even more serious by the fact that the mail states "View on Gitea or reply directly to this mail". These replies will all be lost.

The same applies to the mails when closing an issue. Once again the text "View on Gitea or reply directly to this mail" but a functional reply to Gitea is not possible.

CaiCandong commented 1 year ago

I don't have this mailbox service configured locally. Can you show the links to the replies for the three scenarios? (Creating an Issue, Commenting on an Issue and Closing an Issue)

D-ominik commented 1 year ago

When enabled, email notifications for new comments on an issue include a Reply-To header (among others) with specific parameters to identify the user and issue. image

The email notifications sent when an issue is created or closed are missing this header. However, the text that you can simply reply directly to this mail is present...

inMetaNetworks commented 1 year ago

Hi,

issue creation: no reply to header. If understand https://github.com/go-gitea/gitea/blob/main/services/mailer/mail.go#L335 right, there is no token generated, no Reply-To or List-Post header set, when the issue is created. On creation there is no object comment in the context.

first or later comment: Reply-To: john.ticket-ticket+AEBQIAACBUFAACRKGFOGQAJFCSYD6VI6BIABWBYEAD6M3XIJ3QBQMAABBYFAACYBAMDAAAAFAQAP4AUY@example.com closed ticket: There are mails, which I receive. The mail with the comment only: correct reply-to header. The mail with the notification that the ticket is closed, no reply-to header.

dajrivera commented 9 months ago

Looks like this is fixed by https://github.com/go-gitea/gitea/pull/27997 in main.

yp05327 commented 3 days ago

@inMetaNetworks Can you check it in the latest version, as it seems that it is fixed.