code.gitea.io/gitea@v1.22.3/docs/content/usage/incoming-email.en-us.md (about)

     1  ---
     2  date: "2022-12-01T00:00:00+00:00"
     3  title: "Incoming Email"
     4  slug: "incoming-email"
     5  sidebar_position: 13
     6  draft: false
     7  toc: false
     8  aliases:
     9    - /en-us/incoming-email
    10  menu:
    11    sidebar:
    12      parent: "usage"
    13      name: "Incoming Email"
    14      sidebar_position: 13
    15      identifier: "incoming-email"
    16  ---
    17  
    18  # Incoming Email
    19  
    20  Gitea supports the execution of several actions through incoming mails. This page describes how to set this up.
    21  
    22  ## Requirements
    23  
    24  Handling incoming email messages requires an IMAP-enabled email account.
    25  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.
    26  The receiving email address contains a user/action specific token which tells Gitea which action should be performed.
    27  This token is expected in the `To` and `Delivered-To` header fields.
    28  
    29  Gitea tries to detect automatic responses to skip and the email server should be configured to reduce the incoming noise too (spam, newsletter).
    30  
    31  ## Configuration
    32  
    33  To activate the handling of incoming email messages you have to configure the `email.incoming` section in the configuration file.
    34  
    35  The `REPLY_TO_ADDRESS` contains the address an email client will respond to.
    36  This address needs to contain the `%{token}` placeholder which will be replaced with a token describing the user/action.
    37  This placeholder must only appear once in the address and must be in the user part of the address (before the `@`).
    38  
    39  An example using email sub-addressing may look like this: `incoming+%{token}@example.com`
    40  
    41  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`
    42  
    43  ## Security
    44  
    45  Be careful when choosing the domain used for receiving incoming email.
    46  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`.