http://chloerei.com/2015/04/22/install-and-configure-postfix/
最近搭了一个邮件服务器,把过程记录下来。我已经尽量精炼语句,写出来还是超长,可能直接把人吓退了。确实是这样,自建邮件服务器的人力维护成本不低,一般可以先考虑 Mailgun 之类的服务,遇到第三方服务不好的地方(成本、QQ 送达率)再考虑自建。
这篇文章包含了 Postfix 这些方面配置:
过程用到 telnet 和 openssl 调试 smtp 对话,所以了解一些 smtp 协议更好。
如果需要深入学习,建议从这本书看起:Postfix 权威指南 http://book.douban.com/subject/1754499/
#5 楼 @victor 商业认证是一个门槛,模版审核限制了用途。
#6 楼 @quakewang 独立 IP 贵,现在 Web 服务器支出也只是 $25。另外发信数量没有上限,填了信用卡后感觉睡不着了。
其实 Postfix 已经完成了一些被认为是专业服务商做的工作:
Postfix 相比第三方服务没有的是:
#6 楼 @quakewang 固定 IP 在平时量少(低于 5000 封每天)时,接收方的 limit 比较低,偶尔突发(群发广告或通知)时,反而容易因为超过 limit 而拒收。对于这种情况,共享 IP 反而效果更好。
我猜测 @rei 自建的,情况会跟独立 IP 的比较像,等他分享大规模发送后的经验了。
#11 楼 @rei 嗯,如果网站和 Email 功能结合紧密的,又要考虑到成本和经验积累,自建的确是个好选择。
不过,我不太赞同独立 IP 可以解决 IP limit,我贴一段 Mailgun 的详细说明,从多种情况进行了分析:
Do I need a dedicated IP address?
It depends on various factors.
If you are sending a lot of email (greater than 50k per week), it is a good idea to have a dedicated IP in order to isolate your reputation. If you are sharing your IP, you are sharing your reputation with those other senders. In addition, ESPs limit the total volume per IP, per hour. If you are a high volume sender you should consider a pool of IPs. However, you will have trouble establishing your reputation if you are not sending enough volume consistently from an IP - in this case, a shared IP is preferred.
If your email sending is volatile with large spikes of volume, ESPs may assume those large spikes are spam. Also, if your overall volume is too low, they won’t acknowledge your reputation. Generally, if you are sending less than 5,000 emails per day, a shared IP may be the right solution.
The other thing to consider is using separate IPs for your bulk and transactional mail. There are a couple reasons for this:
Delivery of time-sensitive transactional emails may get queued behind a large batch of bulk/marketing emails. Your transactional mail will be affected by the reputation created by your bulk/marketing mail. Mailgun’s infrastructure mitigates some of the argument’s for a dedicated IP address. First of all, we are constantly monitoring our shared IP addresses for any reputation issues. We also allow you to schedule delivery of your emails by using the o:deliverytime parameter. This allows you to delay the delivery by using a time in the future and also allows you to jump other messages in your queue (say from a large bulk mailing) by using a delivery time of now.
如果是新装的系统,推荐试试 iredmail,一键安装。什么 apache、postfix、mysql 或 postgresql、sasl、反垃圾、扫病毒、mailwebmail、web 管理等等一股脑都给装好了。 以前在 redhat 下给公司装过基于 qmail 的邮件系统,相当的麻烦。相比来说 iredmail 还是很省事的。