Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GNU/Linux sendmail implementation to send all mails to the Telegram bot

License

NotificationsYou must be signed in to change notification settings

conformist-mw/sendmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Builder

New Project(1)

Description

Traditionally 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.

This 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 themailutils orbsd-mailx packages (these require that an MTA is installed, usually Postfix/Exim/Sendmail and so on).

Installation

There are two ways to install it:

  1. Recommended

    • go toReleases and download currenttg-sendmail_x.x.x_all.deb
    • install:
    sudo apt install ./tg-sendmail_x.x.x_all.deb
    • optionally (to send mails as user):
     sudo apt install bsd-mailx# or mailutils
  2. Manual

    • clone this repo
    • copy files to their destinations:
     sudo cp src/sendmail.py /usr/sbin/sendmail sudo cp src/sendmail.ini /etc/tg-sendmail.ini# fill values sudo touch /var/log/tg-sendmail.log sudo chmod 666 /var/log/tg-sendmail.log

Build package yourself

git clone https://github.com/conformist-mw/sendmailcd sendmailsudo apt install devscripts debhelper dh-exec dh-make dh-pythondebuild --no-lintian

Usage

After installation, you can check how it works for cron tasks, which notify the user by email in case of an error:

  • add a knowingly erroneous command to the cron:
***** /usr/bin/non-existent-command

Failed cron job

Send emails:

$echo'Mail from the server'| mail -s'Test subject' oleg.smedyuk@gmail.com

Sent email

Send files (see telegram bot apilimitations):

$ sendmail --send-file /var/log/tg-sendmail.log

Sent file

About

GNU/Linux sendmail implementation to send all mails to the Telegram bot

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp