- Notifications
You must be signed in to change notification settings - Fork3
Open source temp mail service, anonymous and free
License
vwh/vwh-email
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation

Open-source temporary email service that provides quick, anonymous email solutions.
Website• API DocsStatus: Under Development
- Complete Docker containerization is in progress
- Will include Postfix mail server
- One-click deployment
- Simplified configuration
- Expected features:
- Pre-configured Postfix
- Integrated webhook
- Easy environment setup
- Domain: vwh.sh
- DNS Provider: Cloudflare
- Server: Ubuntu VPS
- Mail Server Software: Postfix
Log in to your Cloudflare account
Select your domain (vwh.sh)
Note: In all the following steps, replace
vwh.sh
with your domain name.Go to the DNS settings
Add the following records:
- MX record:
- Name:
@
- Value:
mail.vwh.sh
- Priority: 10
- Name:
- A record:
- Name:
mail
- Value:
[Your VPS IP address]
- Name:
- TXT record (for SPF):
- Name:
@
- Value:
v=spf1 mx ~all
- Name:
- MX record:
- SSH into your Ubuntu VPS
- Update the system:
sudo apt update&& sudo apt upgrade -y
- Set the hostname:
sudo hostnamectl set-hostname mail.vwh.sh
- Update
/etc/hosts
:Add:sudo nano /etc/hosts
[Your VPS IP] mail.vwh.sh vwh.sh
- Install Postfix:
sudo apt install postfix -y
- During installation, choose "Internet Site" and enter "vwh.sh" as the system mail name
- Edit the main Postfix configuration:Add or modify these lines:
sudo nano /etc/postfix/main.cf
myhostname = mail.vwh.shmydestination = $myhostname, vwh.sh, localhost.$mydomain, localhostinet_interfaces = allmynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destinationvirtual_alias_domains = vwh.shvirtual_alias_maps = regexp:/etc/postfix/virtual_regexp
- Create and edit the
virtual_regexp
file:Add this line:sudo nano /etc/postfix/virtual_regexp
/.+@vwh\.sh/ catchall@vwh.sh
- Restart Postfix:
sudo systemctl restart postfix
Install procmail:
sudo apt install procmail -y
Create a script to forward emails:
sudo nano /usr/local/bin/forward-to-webhook.sh
Add the following content:
#!/bin/bashsed'/Content-Disposition: attachment/,/^\s*$/d; /Content-Disposition: inline/,/^\s*$/d'| \curl -X POST -H"Content-Type: text/plain" -H"Secret: 12398" --data-binary @- http://localhost:9169/webhook
Note: Update the
Secret
to match your website/webhook environment variableNote: It will forward the email to the webhook URL by default (http://localhost:9169/webhook). If you want to forward it to a different URL, you can change the URL in the script.
Make the script executable:
sudo chmod +x /usr/local/bin/forward-to-webhook.sh
Edit the Postfix aliases file:
sudo nano /etc/aliases
Add this line:
catchall: "|/usr/local/bin/forward-to-webhook.sh"
Update the aliases database:
sudo newaliases
Restart Postfix:
sudo systemctl restart postfix
Clone VWH Email repository:
git clone https://github.com/vwh/vwh-emailcd vwh-email
Install dependencies:
npm install --force
Configure environment variables:
- Add your
SECRET
to the environment configuration
SECRET="12398"
- Add your
Start development server:
npm run dev
Contributions are welcome! Feel free to open a pull request with your improvements or fixes.
Under the MIT License. SeeLicense for more information.
About
Open source temp mail service, anonymous and free