( MOVED ) https://github.com/vwh/temp-mail
 
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.shwith 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.sh mydestination = $myhostname, vwh.sh, localhost.$mydomain, localhost inet_interfaces = all mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination virtual_alias_domains = vwh.sh virtual_alias_maps = regexp:/etc/postfix/virtual_regexp
- Create and edit the virtual_regexpfile: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/bash sed '/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 Secretto 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-email cd vwh-email
- 
Install dependencies: npm install --force 
- 
Configure environment variables: - Add your SECRETto 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. See License for more information.