Skip to content

elgato69/emailgen.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📧 emailgen.py

emailgen.py is a small Python script for generating throwaway email addresses by creating aliases on a Mailcow server.

Note: this script creates ALIASES not full mailboxes, because I use this to generate steam accounts and have all the 2fa confirmations in a single mailbox.


Usage

Create a new alias with a random name

python emailgen.py --new

Specify a custom name instead of a randomly generated one

python emailgen.py --new --custom-name myalias

Requirements

  • Python 3.7+
  • A running Mailcow instance
  • An API key with permission to create aliases

Install dependencies:

pip install requests pyyaml

Set required values in config.yml

#base domain to create addresses for. change to your own domain
BASE_DOMAIN: example.com

#the public-facing address of your mailcow instance
MAILCOW_ENDPOINT: mailcow.example.com

#api key for your mailcow user
MAILCOW_API_KEY: 000000-000000-000000-000000-000000

#the destination mailbox for the alias, since this script works by creating aliases and not full mailboxes
DEST_MAILBOX: [email protected]

Todo

  • Automatic clearing of aliases older than a given time period
  • Check if alias exists before attempting to add
  • Ability to delete and edit aliases
  • Ability to add a full mailbox

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages