diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 470a53c..96f5e05 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -39,10 +39,10 @@ jobs: tags: smtp_to_telegram build-args: | ST_VERSION=${{ steps.git_version.outputs.ST_VERSION }} - - run: docker run --platform=linux/amd64 --rm smtp_to_telegram --help 2>&1 | grep 'A small program which listens' - - run: docker run --platform=linux/arm/v6 --rm smtp_to_telegram --help 2>&1 | grep 'A small program which listens' - - run: docker run --platform=linux/arm/v7 --rm smtp_to_telegram --help 2>&1 | grep 'A small program which listens' - - run: docker run --platform=linux/arm64 --rm smtp_to_telegram --help 2>&1 | grep 'A small program which listens' + - run: docker run --platform=linux/amd64 --rm smtp_to_telegram --help 2>&1 | grep 'A simple program that listens' + - run: docker run --platform=linux/arm/v6 --rm smtp_to_telegram --help 2>&1 | grep 'A simple program that listens' + - run: docker run --platform=linux/arm/v7 --rm smtp_to_telegram --help 2>&1 | grep 'A simple program that listens' + - run: docker run --platform=linux/arm64 --rm smtp_to_telegram --help 2>&1 | grep 'A simple program that listens' - uses: docker/login-action@v3 with: diff --git a/Readme.md b/Readme.md index 1470c4d..b66ea55 100644 --- a/Readme.md +++ b/Readme.md @@ -8,20 +8,20 @@ [Go Report Card]: https://goreportcard.com/report/github.com/KostyaEsmukov/smtp_to_telegram [License]: https://github.com/KostyaEsmukov/smtp_to_telegram/blob/master/LICENSE -`smtp_to_telegram` is a small program which listens for SMTP and sends +`smtp_to_telegram` is a simple program that listens for SMTP and forwards all incoming Email messages to Telegram. -Say you have a software which can send Email notifications via SMTP. -You may use `smtp_to_telegram` as an SMTP server so +Say you have a software that can send Email notifications via SMTP. +You can use `smtp_to_telegram` as an SMTP server so the notification mail would be sent to the chosen Telegram chats. ## Getting started 1. Create a new Telegram bot: https://core.telegram.org/bots#creating-a-new-bot. -2. Open that bot account in the Telegram account which should receive +2. Open that bot account in the Telegram account that should receive the messages, press `/start`. 3. Retrieve a chat id with `curl https://api.telegram.org/bot/getUpdates`. -4. Repeat steps 2 and 3 for each Telegram account which should receive the messages. +4. Repeat steps 2 and 3 for each Telegram account that should receive the messages. 5. Start a docker container: ``` @@ -33,7 +33,7 @@ docker run \ ``` Assuming that your Email-sending software is running in docker as well, -you may use `smtp_to_telegram:2525` as the target SMTP address. +you can use `smtp_to_telegram:2525` as the target SMTP address. No TLS or authentication is required. The default Telegram message format is: @@ -42,7 +42,7 @@ The default Telegram message format is: From: {from}\\nTo: {to}\\nSubject: {subject}\\n\\n{body}\\n\\n{attachments_details} ``` -A custom format might be specified as well: +A custom format can be specified as well: ``` docker run \ diff --git a/smtp_to_telegram.go b/smtp_to_telegram.go index 7d09c87..97e3ce1 100644 --- a/smtp_to_telegram.go +++ b/smtp_to_telegram.go @@ -90,7 +90,7 @@ func GetHostname() string { func main() { app := cli.NewApp() app.Name = "smtp_to_telegram" - app.Usage = "A small program which listens for SMTP and sends " + + app.Usage = "A simple program that listens for SMTP and forwards " + "all incoming Email messages to Telegram." app.Version = Version app.Action = func(c *cli.Context) error {