如何搭建自定义SMTP邮件服务器

本文最后更新于:1 年前

如何搭建自定义SMTP邮件服务器

域名

当你发送邮件是,你需要有一个邮件地址,例如:mail@yourdomain.com
所以你需要有一个域名yourdomain.com来充当邮件服务器。
如果你还没有域名,可以从这些域名提供商或者你所知道的其他域名提供商注册一个全新域名。

  • 阿里云.
  • 腾讯云.
  • Godaddy.
  • NameCheap.
  • freenom.
  • Enom.
  • Google Domain.

VPS服务器(Port 25开放)

此外你还需要一个服务器,用来安装和配置你的SMTP服务器。
注意,大部分服务器会封闭25端口,你需要确服务器供应商允许访问25端口,包括入口和出口测都要是放开的。
vps端口

VPS基础配置

  1. 检查hostname
    1
    hostname -f
  2. 如果hostname不是域名的格式,修改成*.yourdomain.com
    1
    sudo hostname server.yourdomain.com

    域名解析

    现在vps服务器已经配置完成,需要到域名提供商添加如下格式的域名解析。
    Type:A记录
    Host: server
    IP: YOUR_SERVER_IP

配置SMTP服务器

安装WHM(Webmin)

现有的SMTP工具有PowerMTA, Postal Exim, Postfix等, 在这个例子中,我们选择Postfix作为我们的SMT服务。
为了便于安装,我们可以直接安装一个网站管理工具(Web Hosting Manager - Webmin),这个工具将直接安装和自动配置Postfix.
执行以下脚本安装Webmin

1
2
3
4
wget http://software.virtualmin.com/gpl/scripts/install.sh 
this command will download the installation script, now let's start the setup by running this command:

sudo /bin/sh install.sh

Virtual server

Administration password: PpcmrRPXbP0SoZ4

User Account Email Address

admin
0miA2cfZw1Xjma6
support
RkAESaItOZBd3N3
musk
RkAESaItOZBd3N3

DKIM & SPF

https://app.easydmarc.com/dashboard?open_add_modal=true

Reverse DNS

https://mxtoolbox.com/SuperTool.aspx?action=a%3aserver.lottochip.com&run=toolpage

v=DKIM1; k=rsa; t=s; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwX1tgT+sDPnOQtcdelbhFFrXNhVqGlyiEPuDq4P16Z7+Le62P1MgZiuhSEWefKN87NWuM0d0y8F7efCDmpfavUe0K2kFYrY7s3nuLcaGEUa/bHhX2HAT0Z4+6fOT/zygzyfhKZqWuFfu/vRHMLPwYe81AofKRulac5X8ztAareDbaO8aa0OBacAQotjrvX1ks35QxNSZaEmPhZ9etZU1kUnMq+KPydNno02ate1NvFxQq6QQ1yofS5W16Ct8Oyi148cBJFEk1Ds5CbKW/dhktgQV0D/p1Hpx71gB2L4eBBpUiRmKdukI4MQS/w1gFhUTZcJky8dgJvKHpEWusK/ecQIDAQAB

Most reputation systems only store data for 30 days

Warming up IP Tips:
There are some crucial tips that you have to Follow while warming up IP:

Don’t ever start before you get a High sending score: Ensure this by configuring SPF, DKIM, rDNS, and other Technical Details that I Explained in Detail in my courses, if you are interested, you can check here.
Don’t ever send promotional emails in the warmup period. You need the highest engagement rates, so send transactional emails or maybe some valuable info.
Mail only to your top active subscribers first. Ensure almost 0% bounce rates.
Don’t rotate or switch IPs during warmup. Rotation is a sign of spam.
In your emails, add a clear link for people to unsubscribe.
Add Email Signature that makes your emails look trusted.
Mix your campaigns with premium SMTP services – this will give better user interaction and domain reputation.
Join News Letters. This will make a lot of emails come to your inbox and give you a Higher domain reputation.
Send to your friend’s list and ask them to report you as non-spam and tell them to reply.
Try your best to build an audience and warm up to that audience. In this way, you will achieve the best user interaction and will make the “warming up process” a lot easier.
Monitor your campaigns accurately, and be sure to keep your bounce rate below 2% by validation your emails (I do use Debounce Email validation service to validate my emails which cheap and powerful)

Monitor Reputation?
Having the right tools for checking the IP reputation
is half way to success. Here are some tools and
services you can use:

Senderscore.org by Return Path. The score ranks from 0 to 100, 100
being the best. It tells you how you’re performing. Typically it’s
recommended that you maintain your sender score of 90 or better.
Senderbase.com by Cisco. It tells you how your reputation is across
all the network providers Cisco manages. The reputation score is
grouped into Good, Neutral, and Poor.
Postmaster.live.com. Microsoft’s Smart Network Data Services give
you the information about the traffic originating from your IP address
such as the volume of sent emails, complaint rates, and spam trap
hits.
Postmaster.google.com. Gives access to your domain’s data on Google Search Console.
Postmaster.aol.com. Check your IP reputation and rates it as “bad”, “neutral”, and “good”.

https://app.debounce.io/
usdocker.k8s@gmail.com
Aa@123456,.

ip信誉中心
https://talosintelligence.com/reputation_center

  1. build audience
    how to build email lists?
    10000 lead one month and free!