-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add support for incoming emails #22056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5713613
Add support for incoming emails.
KN4CK3R 47029bf
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R e159bb8
Add comments.
KN4CK3R 7c818d5
Fix merge error.
KN4CK3R ecb606d
Use enmime library.
KN4CK3R 90860b6
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R f7e74bb
Add example ini.
KN4CK3R b82efef
Fix merge errors.
KN4CK3R d85d448
Add missing import.
KN4CK3R f46ca3f
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R ed3c24f
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 28a34fe
Apply suggestions from code review
KN4CK3R 80c1466
Log disallowed attachment name.
KN4CK3R f7ee50e
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 35aa103
Merge branch 'main' into feature-incoming-email
lunny 4e38af3
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 5387897
Merge branch 'feature-incoming-email' of https://github.com/KN4CK3R/g…
KN4CK3R a334f55
Merge branch 'main' into feature-incoming-email
KN4CK3R 1834a3f
Merge branch 'main' into feature-incoming-email
lunny 0beb48a
Merge branch 'main' into feature-incoming-email
lunny 6b2fe10
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R b0a2c8f
Add suggested changes.
KN4CK3R 5094c0d
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 5066d29
Merge
KN4CK3R 9c54fcf
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 93b3469
Fix typo.
KN4CK3R 661c367
return err
KN4CK3R File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
date: "2022-12-01T00:00:00+00:00" | ||
title: "Incoming Email" | ||
slug: "incoming-email" | ||
draft: false | ||
toc: false | ||
menu: | ||
sidebar: | ||
parent: "usage" | ||
name: "Incoming Email" | ||
weight: 13 | ||
identifier: "incoming-email" | ||
--- | ||
|
||
# Incoming Email | ||
|
||
Gitea supports the execution of several actions through incoming mails. This page describes how to set this up. | ||
|
||
**Table of Contents** | ||
|
||
{{< toc >}} | ||
|
||
## Requirements | ||
|
||
Handling incoming email messages requires an IMAP-enabled email account. | ||
The recommended strategy is to use [email sub-addressing](https://en.wikipedia.org/wiki/Email_address#Sub-addressing) but a catch-all mailbox does work too. | ||
The receiving email address contains a user/action specific token which tells Gitea which action should be performed. | ||
This token is expected in the `To` and `Delivered-To` header fields. | ||
|
||
Gitea tries to detect automatic responses to skip and the email server should be configured to reduce the incoming noise too (spam, newsletter). | ||
|
||
## Configuration | ||
|
||
To activate the handling of incoming email messages you have to configure the `email.incoming` section in the configuration file. | ||
|
||
The `REPLY_TO_ADDRESS` contains the address an email client will respond to. | ||
This address needs to contain the `%{token}` placeholder which will be replaced with a token describing the user/action. | ||
This placeholder must only appear once in the address and must be in the user part of the address (before the `@`). | ||
|
||
An example using email sub-addressing may look like this: `incoming+%{token}@example.com` | ||
|
||
If a catch-all mailbox is used, the placeholder may be used anywhere in the user part of the address: `incoming+%{token}@example.com`, `incoming_%{token}@example.com`, `%{token}@example.com` | ||
|
||
## Security | ||
|
||
Be careful when choosing the domain used for receiving incoming email. | ||
It's recommended receiving incoming email on a subdomain, such as `incoming.example.com` to prevent potential security problems with other services running on `example.com`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.