RackNerd Billboard Banner

How to Generate Temporary Email Addresses Using the Linux Terminal

Tired of giving out your real email just to sign up for a one-time download or access a forum you’ll never visit again? You’re not alone. That’s where temporary email addresses come in—burner inboxes that vanish after a short time, keeping your primary inbox clean and private.

In this post, I’ll show you how to create temporary email addresses using nothing but your Linux terminal. No browser. No shady websites. Just pure command-line control.


What You’ll Need

  • A Linux machine (or WSL on Windows)
  • curl or wget installed
  • An internet connection
  • A little terminal savvy

Option 1: Using 1secmail API

1secMail is a free, no-registration disposable email service. Here’s how to use it via the terminal.

Step 1: Generate a random inbox

USER=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10)
DOMAIN="1secmail.com"
EMAIL="${USER}@${DOMAIN}"
echo "Temporary Email: $EMAIL"

Step 2: Check the inbox

Run this to check for messages:

curl -s "https://www.1secmail.com/api/v1/?action=getMessages&login=$USER&domain=$DOMAIN" | jq

Note: If you don’t have jq installed, remove the pipe and just read the raw JSON.

Step 3: Read a message

Once you see a message ID, fetch its content like this:

curl -s "https://www.1secmail.com/api/v1/?action=readMessage&login=$USER&domain=$DOMAIN&id=MSG_ID" | jq

Replace MSG_ID with the actual ID you got from the inbox check.


Option 2: Command-Line Client for Guerrilla Mail

Guerrilla Mail also provides a free API, but the setup is more involved. If you prefer quick and dirty, stick with 1secMail. But if you want a more feature-rich approach, consider this CLI project:

https://github.com/SimonBrazell/guerrillamail-cli

Clone it, follow the setup instructions, and you’ll be able to send and receive temp emails via terminal.


Security Reminder

These services are public. Don’t use them for anything sensitive. Anyone who knows your address (and that it’s temporary) can read your inbox.


Wrapping Up

Temporary email addresses are great for beating spam and keeping your real email private. With a few commands in your Linux terminal, you can create disposable inboxes in seconds—no browser needed. It’s efficient, minimal, and private.

Got any other terminal tricks? Drop them in the comments below.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
RackNerd Billboard Banner
0
Would love your thoughts, please comment.x
()
x
Copy link