Coder Social home page Coder Social logo

smtp2tg's Introduction

smtp2tg

SMTP 2 Telegram very simple relay

Building

Building requires go version go1.6.1. You may use older versions, but without any warranty.

Before build, you must instal several packages:

go get gopkg.in/telegram-bot-api.v4
go get github.com/spf13/viper

And build program:

go build

Running

Copy binary file to /usr/local/bin, or just run from building directory:

./smtp2tg

or

./smtp2tg -c /etc/smtp2tg.toml

If you want to listen 25 port, you need run program as root.

Daemonizing

Unfortunately, golang has some problems with daemonizing: golang/go#227

You can "daemonize" smtp2tg with system tools, like start-stop-daemon

Usage

You need to point valid dns MX-record to ipaddr, on which daemon is listening. Example, if smtp2tg is listening on 1.2.3.4:

$ORIGIN example.com.
...
alert                   A           1.2.3.4
alert                   IN MX 10    alert.example.com.

And then just send email to [email protected]

smtp2tg's People

Contributors

ircop avatar paulannekov avatar goletsa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.