Skip to content

psarna/edgemail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edgemail

A professional, production-grade SMTP server! No it's not. This demo project implements a very simple temporary e-mail, capable of receiving e-mails and storing them in libSQL (locally), sqld, or Turso.

Tutorial: Write your own email server in Rust

Example deployment: https://sorry.idont.date/

In order to get it to work, run it on a machine with public IP, port 25 exposed, and add all appropriate DNS entries - an MX entry and its corresponding A entry that points to the IP address where edgemail is deployed.

inbox api

If you start edgemail with --api-port <port>, it also serves a JSON API on that port.

  • GET /inbox?inbox=<email@domain>&page=<n> returns { mail, has_more_pages }, where mail contains up to 10 messages with date, recipients, sender, subject, and id; page defaults to 1
  • GET /inbox/<id> returns a single message with id, date, recipients, sender, subject, and body
  • after 100 API requests have been served, later requests return 503 Service Unavailable
  • API requests time out after 30 seconds and return 504 Gateway Timeout

client

edgemail has a client you can run as a static webpage. Find all the files in client/ directory. The only thing that needs to be changed is the database URL and the readonly_token used to authenticate for read-only access.

About

No description, website, or topics provided.

Resources

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE2.0

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors