how to set up a disposable email system.


In certain specific environments, it may be necessary to use a "disposable/temporary email system". This article will guide you through setting up such a system. You can install and run the project by following the scripts in order. Each command has an explanation, so you can choose to run them as needed. Please modify the commands for your specific environment.


#install git
yum install git -y
#install nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
#install nodejs和 npm
nvm install 6.10.0
#check nodejs version
node -v
#download source code
git clone https://github.com/malaohu/forsaken-mail.git
cd forsaken-mail
npm install
#install pm2 tool
npm install -g pm2
killall sendmail
/etc/init.d/postfix stop
chkconfig --level 2345 postfix off
chkconfig --level 2345 sendmail off
# CentOS7+
systemctl stop postfix
#start
pm2 start bin/www
pm2 startup
pm2 save



Docker Deployment:


The original author has already written a Dockerfile in their source code. However, they have not published it to docker.com.

I have forked the author's source code and made some modifications, and have successfully published it to docker.com for everyone to use!

The Docker image deployed by the blogger can be found at: malaohu/forsaken-mail

Which free Docker containers can be used for deployment? What are the limitations?

Firstly, the container must have a dedicated IP address and support port 25.

Of course, Hyper_ is also an option.

Some people ask how to deal with the credit card verification required for Hyper_?

I would suggest searching on Internet, where you may find a solution.

To deploy, simply run one line of code:


docker run --name forsaken-mail -d -p 25:25 -p 3000:3000 malaohu/forsaken-mail



Once the deployment is complete, you can access it by simply adding port 3000 to the EndPoint URL!


Binding a Domain Name


Simply point the domain name to the server IP address or CNAME it to a specific website. Want to have your own domain name?

Try CNAMEing your own domain name to itself and then access it with your domain name plus port 3000 to see if you can create your own domain name email instantly!


Reverse Proxy


If you find port 3000 inconvenient, you can also use a reverse proxy!