Annotation For README.md
Logged in as anonymous

Origin for each line in README.md from check-in 158c9cffc6:

880ce86a7f 2026-08-01    1: # smtp2tg
880ce86a7f 2026-08-01    2: 
880ce86a7f 2026-08-01    3: SMTP-to-Telegram gateway. Receives emails via SMTP and forwards them to Telegram chats.
880ce86a7f 2026-08-01    4: 
880ce86a7f 2026-08-01    5: ---
880ce86a7f 2026-08-01    6: 
880ce86a7f 2026-08-01    7: ## Installation
880ce86a7f 2026-08-01    8: 
880ce86a7f 2026-08-01    9: ### From source
880ce86a7f 2026-08-01   10: ```bash
880ce86a7f 2026-08-01   11: git clone https://github.com/kworr/smtp2tg
880ce86a7f 2026-08-01   12: cd smtp2tg
880ce86a7f 2026-08-01   13: cargo build --release
880ce86a7f 2026-08-01   14: ```
880ce86a7f 2026-08-01   15: 
880ce86a7f 2026-08-01   16: ## Configuration
880ce86a7f 2026-08-01   17: 
880ce86a7f 2026-08-01   18: 1. Create `smtp2tg.toml` (see `smtp2tg.toml.example` for reference).
880ce86a7f 2026-08-01   19: 2. Get a Telegram Bot Token from [@BotFather](https://t.me/BotFather).
880ce86a7f 2026-08-01   20: 3. Get your chat ID (use [@getidsbot](https://t.me/getidsbot) or debug mode in Telegram client).
880ce86a7f 2026-08-01   21: 
880ce86a7f 2026-08-01   22: ### Example configuration
880ce86a7f 2026-08-01   23: ```toml
1723b63d69 2026-08-01   24: api_key = "replace-with-your-telegram-bot-token"
880ce86a7f 2026-08-01   25: api_gateway = "https://api.telegram.org"
880ce86a7f 2026-08-01   26: listen_on = "127.0.0.1:1025"
880ce86a7f 2026-08-01   27: fields = ["date", "from", "subject"]
880ce86a7f 2026-08-01   28: domains = ["example.com", "localhost"]
880ce86a7f 2026-08-01   29: 
880ce86a7f 2026-08-01   30: default = 0
880ce86a7f 2026-08-01   31: 
880ce86a7f 2026-08-01   32: [recipients]
880ce86a7f 2026-08-01   33: "admin@example.com" = 12345678
880ce86a7f 2026-08-01   34: "alerts@example.com" = -10012345678
880ce86a7f 2026-08-01   35: ```
880ce86a7f 2026-08-01   36: 
880ce86a7f 2026-08-01   37: ---
880ce86a7f 2026-08-01   38: 
880ce86a7f 2026-08-01   39: ## Usage
880ce86a7f 2026-08-01   40: 
880ce86a7f 2026-08-01   41: ### Run
880ce86a7f 2026-08-01   42: ```bash
880ce86a7f 2026-08-01   43: ./smtp2tg -c /path/to/smtp2tg.toml
880ce86a7f 2026-08-01   44: ```
880ce86a7f 2026-08-01   45: 
880ce86a7f 2026-08-01   46: ### CLI arguments
1723b63d69 2026-08-01   47: 
880ce86a7f 2026-08-01   48: | Argument      | Description               | Example               |
880ce86a7f 2026-08-01   49: |---------------|---------------------------|-----------------------|
880ce86a7f 2026-08-01   50: | `-h`, `--help` | Show help                 | `smtp2tg --help`      |
880ce86a7f 2026-08-01   51: | `-c`, `--config` | Path to config file     | `smtp2tg -c config.toml` |
880ce86a7f 2026-08-01   52: 
880ce86a7f 2026-08-01   53: ---
880ce86a7f 2026-08-01   54: 
880ce86a7f 2026-08-01   55: ## Security
880ce86a7f 2026-08-01   56: 
880ce86a7f 2026-08-01   57: ### Important
880ce86a7f 2026-08-01   58: - **Recommended usage**: Run on `127.0.0.1` (localhost) only.
880ce86a7f 2026-08-01   59: - If exposing to a network:
880ce86a7f 2026-08-01   60:   - **Restrict port access** via firewall.
880ce86a7f 2026-08-01   61:   - **Use TLS** (e.g., via `stunnel` or `nginx`).
880ce86a7f 2026-08-01   62:   - **Implement authentication** (this software does not provide it).
880ce86a7f 2026-08-01   63: 
880ce86a7f 2026-08-01   64: ### Config file permissions
880ce86a7f 2026-08-01   65: Set file permissions to `0600` (owner read/write only):
880ce86a7f 2026-08-01   66: ```bash
880ce86a7f 2026-08-01   67: chmod 600 smtp2tg.toml
880ce86a7f 2026-08-01   68: ```
880ce86a7f 2026-08-01   69: 
880ce86a7f 2026-08-01   70: ---
880ce86a7f 2026-08-01   71: ## How it works
880ce86a7f 2026-08-01   72: 1. A client (e.g., Postfix) sends an email to `listen_on` (e.g., `127.0.0.1:1025`).
880ce86a7f 2026-08-01   73: 2. smtp2tg parses the email and converts it to a Telegram message.
880ce86a7f 2026-08-01   74: 3. The message is sent to the specified chat (or `default` if address is unknown).
880ce86a7f 2026-08-01   75: 
880ce86a7f 2026-08-01   76: ### Example: Email → Telegram
880ce86a7f 2026-08-01   77: **Incoming email:**
1723b63d69 2026-08-01   78: ```text
880ce86a7f 2026-08-01   79: From: user@example.com
880ce86a7f 2026-08-01   80: To: admin@example.com
880ce86a7f 2026-08-01   81: Subject: Test
880ce86a7f 2026-08-01   82: 
880ce86a7f 2026-08-01   83: Hello, world!
880ce86a7f 2026-08-01   84: ```
880ce86a7f 2026-08-01   85: 
880ce86a7f 2026-08-01   86: **Telegram message:**
1723b63d69 2026-08-01   87: ```html
880ce86a7f 2026-08-01   88: <blockquote expandable>
880ce86a7f 2026-08-01   89: <u><i>Subject:</i></u> <code>Test</code>
880ce86a7f 2026-08-01   90: <u><i>From:</i></u> <code>user@example.com</code>
880ce86a7f 2026-08-01   91: <u><i>Date:</i></u> <code>Mon, 01 Jan 2024 12:00:00 +0000</code>
880ce86a7f 2026-08-01   92: </blockquote>
880ce86a7f 2026-08-01   93: <pre>Hello, world!</pre>
880ce86a7f 2026-08-01   94: ```
880ce86a7f 2026-08-01   95: 
880ce86a7f 2026-08-01   96: ---
880ce86a7f 2026-08-01   97: ## Links
880ce86a7f 2026-08-01   98: - **Original repository**: [http://fs.b1t.name/smtp2tg](http://fs.b1t.name/smtp2tg)
880ce86a7f 2026-08-01   99: - **GitHub Mirror**: [https://github.com/kworr/smtp2tg](https://github.com/kworr/smtp2tg)