Custom SMTP Server banner

Custom SMTP Server

10 devlogs
10h 3m 58s

A custom email server built from scratch in TypeScript that I can self-host to generate temporary emails and alternate emails (also for generating quick Slack alts). It has a built-in API only for my use, but a demo service created with this API is available as a temporary email service (that’s what the demo link goes to). Also proof of alt automation can be seen by typing @jmeow and scrolling through the options, or looking at the ping group @jmeows-alts (why would anyone make 13 alts manually lol)

This was a fun project and I hope you enjoy looking at it!

Demo Repository

Loading README...

jmw

Shipped this project!

Hours: 10.07
Cookies: 🍪 198
Multiplier: 19.66 cookies/hr

ship now yay finally

so i made a custom email reception server (smtp) and a few tools that use it: a temporary email service (the demo link) and a way for me to quickly make slack alt accounts (viewable in the slack group @jmeow-alts)! this was a challenging project, and i’ve learned a lot about how emails work!

hope you enjoy! this was fun to make

(i am allergic to capital letters here aren’t i lol)

jmw

Polished the temporary email page a bit so now it looks better, added some request logging so I can see all the bots trying to figure out if I’m using wordpress, and published the website (demo link on the project). Shipping next!

Attachment
1

Comments

secretaditzu78
secretaditzu78 27 days ago

Nice

jmw

Finished the slack alt thing, it now stores the tokens in a text file after logging in (not sending an image of that file for hopefully obvious reasons).

I have started a temporary email service (which will be the demo link when it’s done so it’s verifiable that the smtp server works) that gives you an email address to send an email to and it shows emails sent to it. CSS coming soon along with making emails pop up without the page requiring a reload!

Attachment
0
jmw

Script to use the SMTP server for hack club account login has been updated to also do signups so now I’ve uhhh created uhhhh… let’s just say “a few” new users while testing

Anyway soon I’ll automate creating a bunch of these and store their tokens in a file so i can do fun stuff with them

Attachment
0
jmw

Yay a use for my project

So I spent a long time automating a browser (using “Astral” with Deno) to sign into a Hack Club account and Slack with only the email (pointing to the SMTP server I coded) and it will retrieve the OTP from the email (and delete it) to sign in. This means I can sign in to alt accounts completely programmatically, and soon make new accounts too. Plus, it logs a simple javascript script to run in the console of slack.com that will log you in.

Note about the video: I can enable headless mode if I want, this is just for showing how it works internally. Also I censored my tokens at the end so you can’t get into my Slack alt!

(nora please increase your rate limits :P /hj
it tried to sign in too fast and got rate limited lol)

0
jmw

Added DELETE method for API routes so that programs using this can delete emails such as OTPs after reading them to save space, also now the api returns an array of all emails that match instead of the most recent one if “/email” is replaced with “/emails”

Attachment
0
jmw

I set up a Postgres database and now new emails are added to it with only a tiny bit of logging, plus I’ve started on an API to get the most recent email with a certain ID, subject, or “to” address.

The screenshot is of me going to the API and seeing a test email I sent at sendtestmail.com

Attachment
3

Comments

jmw
jmw 2 months ago

idk why there’s two identical pictures i only added it once lol

Tree Plate
Tree Plate 2 months ago

i think that’s just a bug that happens sometimes for some reason

jmw
jmw 2 months ago

weird

jmw

Header parsing and refactoring so now it’s easier to read output programatically

Attachment
0
jmw

YES IT CAN FINALLY LOG EMMMAIILLSSSSSSSZSSSS!!!! THIS TOOK SO LONG ok so yeah it logs emails to the console and it’s super messy looking but it WORKS!!! I send an email to it and now it tells me the contents so I can sign up for stuff with this if i want

oh yeah side note i fixed spelling of receive from recieve oops

Attachment
0
jmw

I can send an email now and it receives and logs it! Finally! Turns out I needed to include “\r\n” instead of “\n” to end my lines for some reason, so that works better now. Will try with real emails soon.

Credit for the testing program I’m using: https://jetmore.org/john/code/swaks/

Attachment
0
jmw

Wow SMTP servers are weird

OK so I made a TCP server with Deno on port 25 (SMTP) that listens for connections then sends a message back basically saying hello to the client, and it logs packets received to the console. This took way too long. Seems like the online checkers do not work correctly or maybe I’m missing a gigantic thing but I found a program to test it so yeah hope that works.

Note about screenshot: This is an external testing program I found on the internet that I’m hoping didn’t give me a virus, you can see at the top that it connects and receives “220” and more from my server. This is the part that was so harddddddd

Attachment
Attachment
1

Comments

jmw
jmw 2 months ago

For some reason my 3 screenshot attempts (which i thought i removed) appeared anyway but they’re all the same anyway so yeah