{"id":18451315,"url":"https://github.com/conformist-mw/sendmail","last_synced_at":"2025-08-02T02:40:30.546Z","repository":{"id":82173339,"uuid":"427002030","full_name":"conformist-mw/sendmail","owner":"conformist-mw","description":"GNU/Linux sendmail implementation to send all mails to the Telegram bot","archived":false,"fork":false,"pushed_at":"2024-01-12T16:48:43.000Z","size":28,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T11:07:27.757Z","etag":null,"topics":["mail","mail-transport-agent","mta","python","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conformist-mw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-11T12:58:43.000Z","updated_at":"2025-04-19T17:49:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"baf6fd51-1904-495c-b2c8-4ce7c70cf5a5","html_url":"https://github.com/conformist-mw/sendmail","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/conformist-mw/sendmail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conformist-mw%2Fsendmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conformist-mw%2Fsendmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conformist-mw%2Fsendmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conformist-mw%2Fsendmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conformist-mw","download_url":"https://codeload.github.com/conformist-mw/sendmail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conformist-mw%2Fsendmail/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268329170,"owners_count":24232998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mail","mail-transport-agent","mta","python","telegram"],"created_at":"2024-11-06T07:28:16.980Z","updated_at":"2025-08-02T02:40:30.486Z","avatar_url":"https://github.com/conformist-mw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sendmail to telegram bot\n\n[![Builder](https://github.com/conformist-mw/sendmail/actions/workflows/build.yaml/badge.svg)](https://github.com/conformist-mw/sendmail/actions/workflows/build.yaml)\n\n![New Project(1)](https://user-images.githubusercontent.com/13550539/142740382-147f4b3f-d579-426d-9f36-74e38d24c126.png)\n\n### Description\n\nTraditionally email has been used in Linux to communication or inform the user about some kind of problems. In the current environment it is rather difficult to set up a good mail server so that outgoing mail does not end up in spam. \n\nThis project exists to simplify the notification to the end user. In Linux all programs that want to send an email somewhere always use `/usr/sbin/sendmail`. This project implements that command and also provides a mail-transport-agent package so that it is possible to send mails manually e.g. with the `mailutils` or `bsd-mailx` packages (these require that an MTA is installed, usually Postfix/Exim/Sendmail and so on).\n\n### Installation\n\nThere are two ways to install it:\n\n1. Recommended\n    - go to [Releases](https://github.com/conformist-mw/sendmail/releases) and download current `tg-sendmail_x.x.x_all.deb`\n    - install:\n    ```shell\n    sudo apt install ./tg-sendmail_x.x.x_all.deb\n    ```\n    - optionally (to send mails as user):\n   ```shell\n    sudo apt install bsd-mailx  # or mailutils\n    ```\n\n2. Manual\n    - clone this repo\n    - copy files to their destinations:\n   ```shell\n    sudo cp src/sendmail.py /usr/sbin/sendmail\n    sudo cp src/sendmail.ini /etc/tg-sendmail.ini  # fill values\n    sudo touch /var/log/tg-sendmail.log\n    sudo chmod 666 /var/log/tg-sendmail.log\n   ```\n\n### Build package yourself\n\n```shell\ngit clone https://github.com/conformist-mw/sendmail\ncd sendmail\nsudo apt install devscripts debhelper dh-exec dh-make dh-python\ndebuild --no-lintian\n```\n\n### Usage\n\nAfter installation, you can check how it works for cron tasks, which notify the user by email in case of an error:\n\n- add a knowingly erroneous command to the cron:\n\n```shell\n* * * * * /usr/bin/non-existent-command\n```\n![Failed cron job](https://user-images.githubusercontent.com/13550539/142764635-af564b8e-532e-4981-a6e2-d4974a8d1f79.png)\n\nSend emails:\n\n```shell\n$ echo 'Mail from the server' | mail -s 'Test subject' oleg.smedyuk@gmail.com\n```\n![Sent email](https://user-images.githubusercontent.com/13550539/142764816-0109b90f-cef7-4282-8ca1-d81a9024335d.png)\n\nSend files (see telegram bot api [limitations](https://core.telegram.org/bots/api#sending-files)):\n\n```shell\n$ sendmail --send-file /var/log/tg-sendmail.log\n```\n\n![Sent file](https://user-images.githubusercontent.com/13550539/142765226-ba5d978f-a9af-4c70-bb7f-935c2e3f2f8f.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconformist-mw%2Fsendmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconformist-mw%2Fsendmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconformist-mw%2Fsendmail/lists"}