Coder Social home page Coder Social logo

smtp_mail_bot_server's Introduction

Custom domain SMTP mail bot server

Long name isn't it, it's basically just a program meant to be able to read email contents from one of your custom domains/websites so that you can automate something with it, like a verification bot or something idk up to you

Why

Long story short, refferal type giveaways were pissing me off since they're unfair to people with few friends when compared to influencers that abuse the refferal system, so a modified version of this was used to

I made a video about this, you should watch it here

Features

  • Read mail from a custom domain
  • Fully self hosted, no rate limits, payments or restrictions

Deployment

To use this you need to buy a domain. Then add the following DNS records:

I'll assume that you are running this with

  • Public ip: 210.210.210.210 (You can find yours here https://4.ident.me/)
  • Localhost ip: 192.168.0.10 (Open a console and write ip a or ifconfig on mac/linux, and ipconfig on windows. It starts with 192.168 and is naer your public ip)
  • Domain: example.com

DNS records

Add the following DNS records on your registrar, I recommend cloudflare

Type: A
Name: example.com
Content/Value: 210.210.210.210
TTL: Automatic
Type: MX
Name: example.com
Content/Value: example.com
Priority: 10
TTL: Automatic

Port forwarding

On whatever computer you are running you will have to make sure your router is port forwarded for the port 25 and routes its traffic to the private ip of where the code will run. If it will run on 192.168.0.10, port forward 192.168.0.10 port 25. If you don't know how to do it your ISP might be blocking you or your router is just bad, there are tons of guides online, even on my channel.

Code changes

In the handle_RCPT function, change the domain kianbrose.com to example.com (obviously yours in there)

At the bottom of the script, change the hostname='192.168.x.x' set it to your own private ipv4 ONLY IF 0.0.0.0 RESULTS IN PORT FORWARDING NOT WORKING (Sometimes some operating systems ask that you explicitly use the 192.168 address otherwise port forwarding does not work, like windows)

Running

It will probably complain if you don't use sudo permissions, run as admin on windows or on mac/linux sudo python main.py

Authors

smtp_mail_bot_server's People

Contributors

kianbrose avatar fortranibal avatar royfraction avatar

Stargazers

 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.