Total Pageviews

Thursday 10 August 2017

Forsaken Mail


a self-hosted disposable mail service.


Online Demo
Installation
Setting up your DNS correctly

In order to receive emails, your smtp server address should be made available somewhere. Two records should be added to your DNS records. Let us pretend that we want to receive emails at *@subdomain.domain.com:

    First an MX record: subdomain.domain.com MX 10 mxsubdomain.domain.com. This means that the mail server for addresses like *@subdomain.domain.com will be mxsubdomain.domain.com.
    Then an A record: mxsubdomain.domain.com A the.ip.address.of.your.mailin.server. This tells at which ip address the mail server can be found.

You can fire up Mailin (see next section) and use an smtp server tester to verify that everything is correct.
Let's Go

general way:

npm install
npm start

if you want to run this inside a docker container

docker build -t denghongcai/forsaken-mail .
docker run --name forsaken-mail -d -p 25:25 -p 3000:3000 denghongcai/forsaken-mail

Open your browser and type in

http://localhost:3000

Enjoy!


from https://github.com/denghongcai/forsaken-mail          

----------


即收即毁的临时邮箱系统forsaken-mail


访问部署好的网址,会自动分配一个邮箱。

接收邮箱验证码的时候,确保网页处于打开状态 , 才能收到邮件。
页面刷新后,邮箱就变了。

Linux部署

可以按照依次执行一下脚本即可安装运行项目。

每个命令都有说明,自己选择运行即可~

以下脚本只在CentOS6 系统调试运行过,其他环境请自行修改.

#安装git
yum install git -y

#安装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"

#安装nodejs和 npm
nvm install 6.10.0

#查看nodejs版本是否正确,显示 6.10.0
node -v

#下载项目源码
git clone https://github.com/malaohu/forsaken-mail.git
cd forsaken-mail

#安装项目需要的库
npm install

#安装pm2工具
npm install -g pm2

#禁用postfix和sendmail
killall sendmail
/etc/init.d/postfix stop
chkconfig --level 2345 postfix off
chkconfig --level 2345 sendmail off

#启动项目
pm2 start bin/www

#设置开机启动
pm2 startup
pm2 save



Docker下的部署

原作者的源码中已经写好了Dockerfile。

但是原作者并未发布到docker.com。

将作者的源码forked一份,重新修改了部分文件。已经成功发布到docker.com方便大家使用!

Docker镜像地址: malaohu/forsaken-mail

那些免费的Docker容器可以部署呢?有哪些限制?

首先有独立的IP, 必须支持25端口。部署只需要一行代码:

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

部署完成即可!

然后直接使用EndPoint的网址加上端口 3000 即可访问了!


自定义前缀

已经更新代码,已经支持自定义前缀.

No comments:

Post a Comment