产品

定价

集成

客户

合作伙伴

资源

On-Premises to Cloud 电子邮件 Migration Guide

出版商

Bird

Date

Jun 28, 2020

类别

电子邮件

电子邮件

Email

分享这篇文章

准备好一睹Bird 的风采了吗?

立即预约演示。

很多时候,我们都会听到这样的问题:"你们是否有某种流程手册,规定从内部安装迁移到Bird的过程?

为什么是的,是的,我们有。继续阅读。

First, some back story. The Bird Cloud service was created in 2014 out of the enormous success of the On-Premises Momentum MTA solution. Momentum sits at the core of the Bird Cloud, providing high-speed delivery and traffic shaping for thousands of customers on the cloud service. Because of this, Momentum receives a large portion of our engineering attention, but the results of that work are often buried in performance improvements that don’t get a great deal of press.  Momentum customers see the benefits of this work every time a new public release of Momentum is published.

This does NOT mean that Bird is just “Momentum in the Cloud”. MessageBird is much more than that and can have added benefits for customers who choose to migrate or use them in a hybrid approach.  In addition, we have made it very easy for PowerMTA customers to migrate or use PowerMTA with Bird in a hybrid configuration as well. The rest of this document will describe in detail how you can migrate your message streams from Momentum or PowerMTA to the Bird Cloud service. 

T这里 are really two separate scenarios to consider when migrating to Bird from Momentum or PowerMTA. 

  1.  You are ready to leave the on-premises world entirely, shut down your physical data centers and no longer manage any on-premises MTA directly.  This means eliminating Momentum or PowerMTA from your deployment and sending messages directly to SparkPost for message handling. Or

  2. You have reason to keep some on-premises footprint for one reason or another.  Some possibilities might be:

  • 特定的传输流,需要在以下系统中进行预处理Momentum

  • 为突发或灾难恢复需求进行容量分割

  • 支持PMTA中的老客户,同时将新客户转移到SparkPost。

 …then you want to forward the other messages on to Bird for onward message handling.  

In either situation, you need to be aware that Bird will only accept SMTP messages for delivery that are injected over port 587 or 2525 and use SMTP_Auth with a specific username and password (点击此处查看 SMTP 文档). We also highly recommend connecting with a TLS connection, but that is not strictly required. If you are replacing your MTA layer entirely (scenario 1), then you may also want to consider using the Transmissions REST API which can accept messages over HTTPS connections. 文件 on that API is 这里.

我应该选择哪种方案?

要弄清楚你是处于选项1还是选项2,请考虑这些因素:

  • 您使用Momentum的 Lua 脚本引擎处理比信息路由更复杂的事情吗?

    • Lua is a comprehensive script tool for manipulating messages in-line, but the vast majority of our users only use it to select a binding for delivery.  If that is the case, you can modify your generation code to add an IP_pool 属性 to the X-MSYS-API header and have Bird assign the route for you. 

    • 如果你用Lua来做更复杂的事情,如正文过滤、Mail_From重写或消息节奏计算,而且把这些逻辑移到你的注入程序中是不可行的,你可能要考虑转到选项2阵营。

  • 你的生成系统是否能够使用TLS和SMTP_Auth通过端口587发送邮件?

    • 有些活动管理系统只能通过 25 端口以明文推送邮件。这会给Bird 带来安全问题,因此您可能需要考虑方案 #2

  • 您使用的是PowerMTA 替换语法还是其他在线信息修改方式?

    • If you can move this function up into your generators or use the Bird 模板语言, then you can still use option 1, but otherwise, you may need to think about keeping a PMTA node online for this message modification before shipping to Bird for delivery.

  • Do you require any inbound AV/AS scanning before injection? While this is possible in Momentum and PowerMTA, eBird assumes you have already performed all those checks.  You may want to consider doing that before injection.

No matter which way you go, it is sure to affect your commercial relationship.  As you can imagine, this is not our first rodeo. Be sure to loop in your Commercial Account Manager and Customer Success Manager so we can help you through the details and make sure you are getting the best value for your dollar.

对于方案1营("冷火鸡"):

Let’s assume you are OK with option 1 and you are ready to shut down your on-premises MTAs and you have decided to continue using the SMTP injection method, not changing your message creation systems at all.  Your generation systems should create a fully formatted SMTP message, then push to Bird over TLS using SMTP_AUTH w这里 the username and password are as described on 本页. Remember that the “password” is the API key you generate in your Bird account with the SMTP delivery option turned on.

If you are in the Option #1 camp, consider switching to the REST API right out of your generation system. In most cases, we find that customers’ processing systems are already using JSON over HTTP and have to convert to SMTP before injection. You can skip that step and send it directly to us as JSON 格式的 REST 有效负载.

If you choose to inject with the REST API, you may need to alter your content creation system a bit, but it may be worth it.  点击此处了解更多信息.

One of the biggest concerns large ESPs have with a Migration is IP Warming. Typically they have spent many years grooming their inventory of IP addresses with great care so the thought of abandoning all that work is painful. Bird has worked out a Bring Your Own IP (BYOIP) process that takes care of that issue. If you have at least one contiguous /24 CIDR block, Bird can use those existing IPs for delivery which saves you the pain of having to warm them up again. If you are able to take advantage of that option, you can skip the section 这里 on IP warmup.

如果你觉得你已经准备好了,请跳到 "实现它"。

利用选项2(内部预处理):

不过,如果你是团队方案 2 的成员,那么你需要对部署进行一些配置更改。要将一些选定的信息流从Momentum 或 PMTA 迁移到Bird ,同时仍使用生成系统的 SMTP 注入,最省事的方法就是在配置中添加一个特殊路由。

供Momentum :

  1. Set up a version of Momentum > 3.6.23. 

  2. Install a valid SSL Certificate and open outbound port 587 so Momentum can talk to Bird Configure an outbound domain so you can route a message through Momentum to Bird. 

  3. With the configuration below, any message hitting this configuration will be routed to smtp.sparkpostmail.com using port 587 and SMTP_Auth with the username and password defined t这里.outbound_smtp_auth { } Keep_Message_Dicts_In_Memory = true Domain "smtp.sparkpostmail.com" {   Remote_SMTP_Port = "587"   Outbound_SMTP_AUTH_Type = "LOGIN"   Outbound_SMTP_AUTH_user = "SMTP_Injection"   Outbound_SMTP_AUTH_pass = "17258redacted8bd6cd7a8redacted8c22bce" }

  4. Configure the bindings you want to relay through MessageBird with TLS and gateway them to the domain you defined above.

    请注意。
    TLS is not strictly required but is a strong recommendation. If TLS is not possible for some reason, then IP whitelisting the API keys is also a strong recommendation.


    binding “CustomerA-Outbound” {   Gateway = "smtp-demo.sparkpostelite.com"     TLS = "required"     TLS_Certificate = "/etc/pki/tls/certs/trymsys.net.crt"     TLS_Key = "/etc/pki/tls/certs/trymsys.net.key"     TLS_Ciphers = "DEFAULT" }

供PowerMTA :

  1. Set up a version of PowerMTA > 4.5.0

  2. 安装有效的 SSL 证书并打开对外端口 587,这样PowerMTA 就可以与Bird 对话。

  3. Configure an outbound domain path so you can route a message through PowerMTA to Bird. With the configuration below, any message hitting this configuration will be routed to smtp.sparkpostmail.com using port 587 and SMTP_Auth with the username and password defined t这里.  In PowerMTA, this is also w这里 you can set TLS. 请注意,这一点也有更完整的记录 这里 

<domain sparkpost.rollup>    use-unencrypted-plain-auth yes    auth-username SMTP_Injection    auth-password YourAPIKeygoes这里whenyougenerateit    route smtp.sparkpostmail.com:587    use-starttls yes    require-starttls yes    max-smtp-out 10 </domain>

4.使用上文定义的 {sparkpost} rollup 配置,配置要通过Bird 中转的 VMTAs。

<virtual-mta SparkPostRelay>     <domain *>         queue-to {sparkpost}     </domain> </virtual-mta>

Once you have those configuration changes made, any messages sent to the selected “binding” or “VMTA” should be routed automatically through Bird for delivery.  

使之成为现实

When you start down this road, don’t make the mistake of thinking this is an overnight operation.  Doing this right will take some time and care.  

  1. Setup your Bird account and fully test using a development 子账户 so you can filter out that traffic later.  You will need to do this for either option because you will need the API key for the SMTP_Auth password either way.

  2. If you are using SMTP injection, plan to add an X-MSYS-API header to incorporate all the metadata and message attributes needed.  Any X-Headers should be re-written as metadata and you should include the ip_pool and campaign attributes as well. A sample is available 这里

  3. If you are NOT using BYOIP, then you should make sure you set up slightly different sending domains for use with MessageBird so that you can run both environments in parallel for as long as it is needed.  If your current sending domain is mycompany.com, maybe set up sp.mycompany.com specifically for Bird delivery.  This allows you to migrate slowly and carefully while not compromising either domain.

  4. Make sure you have full domain alignment and security features enabled.  In DNS, set up DKIM、SFP、DMARC, bounce and tracking domains so they all look like they belong to the same organization.

  5. Configure 自动 IP 预热 on your defined IP_Pools.  If you are using the previously mentioned BYOIP option, you can ignore the warmup step.

  6. Start with one message stream and move forward from there.  Just like IP Warmup, you don’t want to do this all at once. Redirect a few hundred messages first, then 10% of the volume, then 20% the following day and increase until you have moved all the volume over. If you are an ESP, select a customer you can work with and test the process with their feedback.  If it all works well, move on to the next one. If you run into problems, take the time to fix it and work it into the process for the next one.

  7. Automate as much as possible with 应用程序接口.  Outside of the DNS changes, the SparkPost config can be mostly automated with 调用几个应用程序接口.

数据收集Bird

MessageBird reports message delivery in a webhooks feed or in the message events API.  Accessing Bird plain text logs is just not possible. You can pull this data back to your environment with a webhooks collector or by calling the 活动 API periodically and consuming the data.  We recommend using webhooks and have 一些建议 on doing that right.  In its most basic form, a PHP webhook collector can be deployed in a few  lines of code:

<?php $verb = $_SERVER['REQUEST_METHOD'];   if ($verb == "POST") {     $jsonStr = file_get_contents("php://input");     http_response_code(200);     $rnum = rand(1000,9999);     $t = date("YmdHis") . $rnum;     $Jfile = './data/data_'.$t.'.txt';     if (file_exists($Jfile)) {        $fn = basename($Jfile,".txt");       $seq = 0;       $ftail = substr($fn,-2,1);       if ($ftail == "-"){         $seq = substr($fn,-1);       }       $seq++;       $Jfile = basename($Jfile,".txt")."-".$seq.".txt";     }       $fh = fopen($Jfile, "w") or die("Unable to create file!");       fwrite($fh, $jsonStr);       fclose($fh);   } ?>

While you are experimenting, you can try them out with free collectors such as http://webhook.site/.

Once you have collected all the webhook data, you can read that into a data store for additional processing.  There are also ways to push Webhooks through services like StitchData and Segment.

The same information is available in the 活动 API if you have a need to PULL the data and cannot accept PUSH data.  Here is a sample Event API call:
GET https://api.sparkpost.com/api/v1/events/message?/

recipients=recipient@example.com&templates=my-template&events

That API is fully documented with samples here:  https://developers.sparkpost.com/api/events/#events-get-search-for-message-events

If you really need the event data back in a form that looks like PMTA or Momentum logging, that is possible as well if you employ some additional conditioning code. The great news is there are 几个例子 to steal from already.

回顾总结

  1. Make sure you talk to your Sales and Success Management team.  We’ve done this before and can help you through it quickly and cost-effectively.

  2. Figure out if you are in Camp #1 (能够完全从内部部署) or Camp #2 (仍需要一些内部 MTA).

  3. Sign up for a 免费测试帐户 to evaluate the integration details.

  4. Decide on SMTP or REST API injection methods.

  5. 如果你使用SMTP注入,想办法把头数据和消息属性弄到X-MSYS-API头中。

  6. Confirm if you can use our BYOIP process.

  7. 如有必要,用新的域名更新你的DNS。

  8. Build a small sample to test your migration.  You may need to adjust your config.

  9. 加大流量,直到所有的流量都被迁移。

  10. 如果你符合第一阵营,在所有流量迁移后,你终于可以关闭你的内部MTA了。

很多时候,我们都会听到这样的问题:"你们是否有某种流程手册,规定从内部安装迁移到Bird的过程?

为什么是的,是的,我们有。继续阅读。

First, some back story. The Bird Cloud service was created in 2014 out of the enormous success of the On-Premises Momentum MTA solution. Momentum sits at the core of the Bird Cloud, providing high-speed delivery and traffic shaping for thousands of customers on the cloud service. Because of this, Momentum receives a large portion of our engineering attention, but the results of that work are often buried in performance improvements that don’t get a great deal of press.  Momentum customers see the benefits of this work every time a new public release of Momentum is published.

This does NOT mean that Bird is just “Momentum in the Cloud”. MessageBird is much more than that and can have added benefits for customers who choose to migrate or use them in a hybrid approach.  In addition, we have made it very easy for PowerMTA customers to migrate or use PowerMTA with Bird in a hybrid configuration as well. The rest of this document will describe in detail how you can migrate your message streams from Momentum or PowerMTA to the Bird Cloud service. 

There are really two separate scenarios to consider when migrating to Bird from Momentum or PowerMTA. 

  1.  You are ready to leave the on-premises world entirely, shut down your physical data centers and no longer manage any on-premises MTA directly.  This means eliminating Momentum or PowerMTA from your deployment and sending messages directly to SparkPost for message handling. Or

  2. You have reason to keep some on-premises footprint for one reason or another.  Some possibilities might be:

  • 特定的传输流,需要在以下系统中进行预处理Momentum

  • 为突发或灾难恢复需求进行容量分割

  • 支持PMTA中的老客户,同时将新客户转移到SparkPost。

 …then you want to forward the other messages on to Bird for onward message handling.  

In either situation, you need to be aware that Bird will only accept SMTP messages for delivery that are injected over port 587 or 2525 and use SMTP_Auth with a specific username and password (点击此处查看 SMTP 文档). We also highly recommend connecting with a TLS connection, but that is not strictly required. If you are replacing your MTA layer entirely (scenario 1), then you may also want to consider using the Transmissions REST API which can accept messages over HTTPS connections. 文件 on that API is here.

我应该选择哪种方案?

要弄清楚你是处于选项1还是选项2,请考虑这些因素:

  • 您使用Momentum的 Lua 脚本引擎处理比信息路由更复杂的事情吗?

    • Lua is a comprehensive script tool for manipulating messages in-line, but the vast majority of our users only use it to select a binding for delivery.  If that is the case, you can modify your generation code to add an IP_pool 属性 to the X-MSYS-API header and have Bird assign the route for you. 

    • 如果你用Lua来做更复杂的事情,如正文过滤、Mail_From重写或消息节奏计算,而且把这些逻辑移到你的注入程序中是不可行的,你可能要考虑转到选项2阵营。

  • 你的生成系统是否能够使用TLS和SMTP_Auth通过端口587发送邮件?

    • 有些活动管理系统只能通过 25 端口以明文推送邮件。这会给Bird 带来安全问题,因此您可能需要考虑方案 #2

  • 您使用的是PowerMTA 替换语法还是其他在线信息修改方式?

    • If you can move this function up into your generators or use the Bird 模板语言, then you can still use option 1, but otherwise, you may need to think about keeping a PMTA node online for this message modification before shipping to Bird for delivery.

  • Do you require any inbound AV/AS scanning before injection? While this is possible in Momentum and PowerMTA, eBird assumes you have already performed all those checks.  You may want to consider doing that before injection.

No matter which way you go, it is sure to affect your commercial relationship.  As you can imagine, this is not our first rodeo. Be sure to loop in your Commercial Account Manager and Customer Success Manager so we can help you through the details and make sure you are getting the best value for your dollar.

对于方案1营("冷火鸡"):

Let’s assume you are OK with option 1 and you are ready to shut down your on-premises MTAs and you have decided to continue using the SMTP injection method, not changing your message creation systems at all.  Your generation systems should create a fully formatted SMTP message, then push to Bird over TLS using SMTP_AUTH where the username and password are as described on 本页. Remember that the “password” is the API key you generate in your Bird account with the SMTP delivery option turned on.

If you are in the Option #1 camp, consider switching to the REST API right out of your generation system. In most cases, we find that customers’ processing systems are already using JSON over HTTP and have to convert to SMTP before injection. You can skip that step and send it directly to us as JSON 格式的 REST 有效负载.

If you choose to inject with the REST API, you may need to alter your content creation system a bit, but it may be worth it.  点击此处了解更多信息.

One of the biggest concerns large ESPs have with a Migration is IP Warming. Typically they have spent many years grooming their inventory of IP addresses with great care so the thought of abandoning all that work is painful. Bird has worked out a Bring Your Own IP (BYOIP) process that takes care of that issue. If you have at least one contiguous /24 CIDR block, Bird can use those existing IPs for delivery which saves you the pain of having to warm them up again. If you are able to take advantage of that option, you can skip the section here on IP warmup.

如果你觉得你已经准备好了,请跳到 "实现它"。

利用选项2(内部预处理):

不过,如果你是团队方案 2 的成员,那么你需要对部署进行一些配置更改。要将一些选定的信息流从Momentum 或 PMTA 迁移到Bird ,同时仍使用生成系统的 SMTP 注入,最省事的方法就是在配置中添加一个特殊路由。

供Momentum :

  1. Set up a version of Momentum > 3.6.23. 

  2. Install a valid SSL Certificate and open outbound port 587 so Momentum can talk to Bird Configure an outbound domain so you can route a message through Momentum to Bird. 

  3. With the configuration below, any message hitting this configuration will be routed to smtp.sparkpostmail.com using port 587 and SMTP_Auth with the username and password defined there.outbound_smtp_auth { } Keep_Message_Dicts_In_Memory = true Domain "smtp.sparkpostmail.com" {   Remote_SMTP_Port = "587"   Outbound_SMTP_AUTH_Type = "LOGIN"   Outbound_SMTP_AUTH_user = "SMTP_Injection"   Outbound_SMTP_AUTH_pass = "17258redacted8bd6cd7a8redacted8c22bce" }

  4. Configure the bindings you want to relay through MessageBird with TLS and gateway them to the domain you defined above.

    请注意。
    TLS is not strictly required but is a strong recommendation. If TLS is not possible for some reason, then IP whitelisting the API keys is also a strong recommendation.


    binding “CustomerA-Outbound” {   Gateway = "smtp-demo.sparkpostelite.com"     TLS = "required"     TLS_Certificate = "/etc/pki/tls/certs/trymsys.net.crt"     TLS_Key = "/etc/pki/tls/certs/trymsys.net.key"     TLS_Ciphers = "DEFAULT" }

供PowerMTA :

  1. Set up a version of PowerMTA > 4.5.0

  2. 安装有效的 SSL 证书并打开对外端口 587,这样PowerMTA 就可以与Bird 对话。

  3. Configure an outbound domain path so you can route a message through PowerMTA to Bird. With the configuration below, any message hitting this configuration will be routed to smtp.sparkpostmail.com using port 587 and SMTP_Auth with the username and password defined there.  In PowerMTA, this is also where you can set TLS. 请注意,这一点也有更完整的记录 here 

<domain sparkpost.rollup>    use-unencrypted-plain-auth yes    auth-username SMTP_Injection    auth-password YourAPIKeygoesherewhenyougenerateit    route smtp.sparkpostmail.com:587    use-starttls yes    require-starttls yes    max-smtp-out 10 </domain>

4.使用上文定义的 {sparkpost} rollup 配置,配置要通过Bird 中转的 VMTAs。

<virtual-mta SparkPostRelay>     <domain *>         queue-to {sparkpost}     </domain> </virtual-mta>

Once you have those configuration changes made, any messages sent to the selected “binding” or “VMTA” should be routed automatically through Bird for delivery.  

使之成为现实

When you start down this road, don’t make the mistake of thinking this is an overnight operation.  Doing this right will take some time and care.  

  1. Setup your Bird account and fully test using a development subaccount so you can filter out that traffic later.  You will need to do this for either option because you will need the API key for the SMTP_Auth password either way.

  2. If you are using SMTP injection, plan to add an X-MSYS-API header to incorporate all the metadata and message attributes needed.  Any X-Headers should be re-written as metadata and you should include the ip_pool and campaign attributes as well. A sample is available here

  3. If you are NOT using BYOIP, then you should make sure you set up slightly different sending domains for use with MessageBird so that you can run both environments in parallel for as long as it is needed.  If your current sending domain is mycompany.com, maybe set up sp.mycompany.com specifically for Bird delivery.  This allows you to migrate slowly and carefully while not compromising either domain.

  4. Make sure you have full domain alignment and security features enabled.  In DNS, set up DKIM、SFP、DMARC, bounce and tracking domains so they all look like they belong to the same organization.

  5. Configure 自动 IP 预热 on your defined IP_Pools.  If you are using the previously mentioned BYOIP option, you can ignore the warmup step.

  6. Start with one message stream and move forward from there.  Just like IP Warmup, you don’t want to do this all at once. Redirect a few hundred messages first, then 10% of the volume, then 20% the following day and increase until you have moved all the volume over. If you are an ESP, select a customer you can work with and test the process with their feedback.  If it all works well, move on to the next one. If you run into problems, take the time to fix it and work it into the process for the next one.

  7. Automate as much as possible with APIs.  Outside of the DNS changes, the SparkPost config can be mostly automated with 调用几个应用程序接口.

数据收集Bird

MessageBird reports message delivery in a webhooks feed or in the message events API.  Accessing Bird plain text logs is just not possible. You can pull this data back to your environment with a webhooks collector or by calling the 活动 API periodically and consuming the data.  We recommend using webhooks and have 一些建议 on doing that right.  In its most basic form, a PHP webhook collector can be deployed in a few  lines of code:

<?php $verb = $_SERVER['REQUEST_METHOD'];   if ($verb == "POST") {     $jsonStr = file_get_contents("php://input");     http_response_code(200);     $rnum = rand(1000,9999);     $t = date("YmdHis") . $rnum;     $Jfile = './data/data_'.$t.'.txt';     if (file_exists($Jfile)) {        $fn = basename($Jfile,".txt");       $seq = 0;       $ftail = substr($fn,-2,1);       if ($ftail == "-"){         $seq = substr($fn,-1);       }       $seq++;       $Jfile = basename($Jfile,".txt")."-".$seq.".txt";     }       $fh = fopen($Jfile, "w") or die("Unable to create file!");       fwrite($fh, $jsonStr);       fclose($fh);   } ?>

While you are experimenting, you can try them out with free collectors such as http://webhook.site/.

Once you have collected all the webhook data, you can read that into a data store for additional processing.  There are also ways to push Webhooks through services like StitchData and Segment.

The same information is available in the Events API if you have a need to PULL the data and cannot accept PUSH data.  Here is a sample Event API call:
GET https://api.sparkpost.com/api/v1/events/message?/

recipients=recipient@example.com&templates=my-template&events

That API is fully documented with samples here:  https://developers.sparkpost.com/api/events/#events-get-search-for-message-events

If you really need the event data back in a form that looks like PMTA or Momentum logging, that is possible as well if you employ some additional conditioning code. The great news is there are 几个例子 to steal from already.

回顾总结

  1. Make sure you talk to your Sales and Success Management team.  We’ve done this before and can help you through it quickly and cost-effectively.

  2. Figure out if you are in Camp #1 (能够完全从内部部署) or Camp #2 (仍需要一些内部 MTA).

  3. Sign up for a 免费测试帐户 to evaluate the integration details.

  4. Decide on SMTP or REST API injection methods.

  5. 如果你使用SMTP注入,想办法把头数据和消息属性弄到X-MSYS-API头中。

  6. Confirm if you can use our BYOIP process.

  7. 如有必要,用新的域名更新你的DNS。

  8. Build a small sample to test your migration.  You may need to adjust your config.

  9. 加大流量,直到所有的流量都被迁移。

  10. 如果你符合第一阵营,在所有流量迁移后,你终于可以关闭你的内部MTA了。

很多时候,我们都会听到这样的问题:"你们是否有某种流程手册,规定从内部安装迁移到Bird的过程?

为什么是的,是的,我们有。继续阅读。

First, some back story. The Bird Cloud service was created in 2014 out of the enormous success of the On-Premises Momentum MTA solution. Momentum sits at the core of the Bird Cloud, providing high-speed delivery and traffic shaping for thousands of customers on the cloud service. Because of this, Momentum receives a large portion of our engineering attention, but the results of that work are often buried in performance improvements that don’t get a great deal of press.  Momentum customers see the benefits of this work every time a new public release of Momentum is published.

This does NOT mean that Bird is just “Momentum in the Cloud”. MessageBird is much more than that and can have added benefits for customers who choose to migrate or use them in a hybrid approach.  In addition, we have made it very easy for PowerMTA customers to migrate or use PowerMTA with Bird in a hybrid configuration as well. The rest of this document will describe in detail how you can migrate your message streams from Momentum or PowerMTA to the Bird Cloud service. 

There are really two separate scenarios to consider when migrating to Bird from Momentum or PowerMTA. 

  1.  You are ready to leave the on-premises world entirely, shut down your physical data centers and no longer manage any on-premises MTA directly.  This means eliminating Momentum or PowerMTA from your deployment and sending messages directly to SparkPost for message handling. Or

  2. You have reason to keep some on-premises footprint for one reason or another.  Some possibilities might be:

  • 特定的传输流,需要在以下系统中进行预处理Momentum

  • 为突发或灾难恢复需求进行容量分割

  • 支持PMTA中的老客户,同时将新客户转移到SparkPost。

 …then you want to forward the other messages on to Bird for onward message handling.  

In either situation, you need to be aware that Bird will only accept SMTP messages for delivery that are injected over port 587 or 2525 and use SMTP_Auth with a specific username and password (点击此处查看 SMTP 文档). We also highly recommend connecting with a TLS connection, but that is not strictly required. If you are replacing your MTA layer entirely (scenario 1), then you may also want to consider using the Transmissions REST API which can accept messages over HTTPS connections. 文件 on that API is here.

我应该选择哪种方案?

要弄清楚你是处于选项1还是选项2,请考虑这些因素:

  • 您使用Momentum的 Lua 脚本引擎处理比信息路由更复杂的事情吗?

    • Lua is a comprehensive script tool for manipulating messages in-line, but the vast majority of our users only use it to select a binding for delivery.  If that is the case, you can modify your generation code to add an IP_pool 属性 to the X-MSYS-API header and have Bird assign the route for you. 

    • 如果你用Lua来做更复杂的事情,如正文过滤、Mail_From重写或消息节奏计算,而且把这些逻辑移到你的注入程序中是不可行的,你可能要考虑转到选项2阵营。

  • 你的生成系统是否能够使用TLS和SMTP_Auth通过端口587发送邮件?

    • 有些活动管理系统只能通过 25 端口以明文推送邮件。这会给Bird 带来安全问题,因此您可能需要考虑方案 #2

  • 您使用的是PowerMTA 替换语法还是其他在线信息修改方式?

    • If you can move this function up into your generators or use the Bird 模板语言, then you can still use option 1, but otherwise, you may need to think about keeping a PMTA node online for this message modification before shipping to Bird for delivery.

  • Do you require any inbound AV/AS scanning before injection? While this is possible in Momentum and PowerMTA, eBird assumes you have already performed all those checks.  You may want to consider doing that before injection.

No matter which way you go, it is sure to affect your commercial relationship.  As you can imagine, this is not our first rodeo. Be sure to loop in your Commercial Account Manager and Customer Success Manager so we can help you through the details and make sure you are getting the best value for your dollar.

对于方案1营("冷火鸡"):

Let’s assume you are OK with option 1 and you are ready to shut down your on-premises MTAs and you have decided to continue using the SMTP injection method, not changing your message creation systems at all.  Your generation systems should create a fully formatted SMTP message, then push to Bird over TLS using SMTP_AUTH where the username and password are as described on 本页. Remember that the “password” is the API key you generate in your Bird account with the SMTP delivery option turned on.

If you are in the Option #1 camp, consider switching to the REST API right out of your generation system. In most cases, we find that customers’ processing systems are already using JSON over HTTP and have to convert to SMTP before injection. You can skip that step and send it directly to us as JSON 格式的 REST 有效负载.

If you choose to inject with the REST API, you may need to alter your content creation system a bit, but it may be worth it.  点击此处了解更多信息.

One of the biggest concerns large ESPs have with a Migration is IP Warming. Typically they have spent many years grooming their inventory of IP addresses with great care so the thought of abandoning all that work is painful. Bird has worked out a Bring Your Own IP (BYOIP) process that takes care of that issue. If you have at least one contiguous /24 CIDR block, Bird can use those existing IPs for delivery which saves you the pain of having to warm them up again. If you are able to take advantage of that option, you can skip the section here on IP warmup.

如果你觉得你已经准备好了,请跳到 "实现它"。

利用选项2(内部预处理):

不过,如果你是团队方案 2 的成员,那么你需要对部署进行一些配置更改。要将一些选定的信息流从Momentum 或 PMTA 迁移到Bird ,同时仍使用生成系统的 SMTP 注入,最省事的方法就是在配置中添加一个特殊路由。

供Momentum :

  1. Set up a version of Momentum > 3.6.23. 

  2. Install a valid SSL Certificate and open outbound port 587 so Momentum can talk to Bird Configure an outbound domain so you can route a message through Momentum to Bird. 

  3. With the configuration below, any message hitting this configuration will be routed to smtp.sparkpostmail.com using port 587 and SMTP_Auth with the username and password defined there.outbound_smtp_auth { } Keep_Message_Dicts_In_Memory = true Domain "smtp.sparkpostmail.com" {   Remote_SMTP_Port = "587"   Outbound_SMTP_AUTH_Type = "LOGIN"   Outbound_SMTP_AUTH_user = "SMTP_Injection"   Outbound_SMTP_AUTH_pass = "17258redacted8bd6cd7a8redacted8c22bce" }

  4. Configure the bindings you want to relay through MessageBird with TLS and gateway them to the domain you defined above.

    请注意。
    TLS is not strictly required but is a strong recommendation. If TLS is not possible for some reason, then IP whitelisting the API keys is also a strong recommendation.


    binding “CustomerA-Outbound” {   Gateway = "smtp-demo.sparkpostelite.com"     TLS = "required"     TLS_Certificate = "/etc/pki/tls/certs/trymsys.net.crt"     TLS_Key = "/etc/pki/tls/certs/trymsys.net.key"     TLS_Ciphers = "DEFAULT" }

供PowerMTA :

  1. Set up a version of PowerMTA > 4.5.0

  2. 安装有效的 SSL 证书并打开对外端口 587,这样PowerMTA 就可以与Bird 对话。

  3. Configure an outbound domain path so you can route a message through PowerMTA to Bird. With the configuration below, any message hitting this configuration will be routed to smtp.sparkpostmail.com using port 587 and SMTP_Auth with the username and password defined there.  In PowerMTA, this is also where you can set TLS. 请注意,这一点也有更完整的记录 here 

<domain sparkpost.rollup>    use-unencrypted-plain-auth yes    auth-username SMTP_Injection    auth-password YourAPIKeygoesherewhenyougenerateit    route smtp.sparkpostmail.com:587    use-starttls yes    require-starttls yes    max-smtp-out 10 </domain>

4.使用上文定义的 {sparkpost} rollup 配置,配置要通过Bird 中转的 VMTAs。

<virtual-mta SparkPostRelay>     <domain *>         queue-to {sparkpost}     </domain> </virtual-mta>

Once you have those configuration changes made, any messages sent to the selected “binding” or “VMTA” should be routed automatically through Bird for delivery.  

使之成为现实

When you start down this road, don’t make the mistake of thinking this is an overnight operation.  Doing this right will take some time and care.  

  1. Setup your Bird account and fully test using a development subaccount so you can filter out that traffic later.  You will need to do this for either option because you will need the API key for the SMTP_Auth password either way.

  2. If you are using SMTP injection, plan to add an X-MSYS-API header to incorporate all the metadata and message attributes needed.  Any X-Headers should be re-written as metadata and you should include the ip_pool and campaign attributes as well. A sample is available here

  3. If you are NOT using BYOIP, then you should make sure you set up slightly different sending domains for use with MessageBird so that you can run both environments in parallel for as long as it is needed.  If your current sending domain is mycompany.com, maybe set up sp.mycompany.com specifically for Bird delivery.  This allows you to migrate slowly and carefully while not compromising either domain.

  4. Make sure you have full domain alignment and security features enabled.  In DNS, set up DKIM、SFP、DMARC, bounce and tracking domains so they all look like they belong to the same organization.

  5. Configure 自动 IP 预热 on your defined IP_Pools.  If you are using the previously mentioned BYOIP option, you can ignore the warmup step.

  6. Start with one message stream and move forward from there.  Just like IP Warmup, you don’t want to do this all at once. Redirect a few hundred messages first, then 10% of the volume, then 20% the following day and increase until you have moved all the volume over. If you are an ESP, select a customer you can work with and test the process with their feedback.  If it all works well, move on to the next one. If you run into problems, take the time to fix it and work it into the process for the next one.

  7. Automate as much as possible with APIs.  Outside of the DNS changes, the SparkPost config can be mostly automated with 调用几个应用程序接口.

数据收集Bird

MessageBird reports message delivery in a webhooks feed or in the message events API.  Accessing Bird plain text logs is just not possible. You can pull this data back to your environment with a webhooks collector or by calling the Events API periodically and consuming the data.  We recommend using webhooks and have 一些建议 on doing that right.  In its most basic form, a PHP webhook collector can be deployed in a few  lines of code:

<?php $verb = $_SERVER['REQUEST_METHOD'];   if ($verb == "POST") {     $jsonStr = file_get_contents("php://input");     http_response_code(200);     $rnum = rand(1000,9999);     $t = date("YmdHis") . $rnum;     $Jfile = './data/data_'.$t.'.txt';     if (file_exists($Jfile)) {        $fn = basename($Jfile,".txt");       $seq = 0;       $ftail = substr($fn,-2,1);       if ($ftail == "-"){         $seq = substr($fn,-1);       }       $seq++;       $Jfile = basename($Jfile,".txt")."-".$seq.".txt";     }       $fh = fopen($Jfile, "w") or die("Unable to create file!");       fwrite($fh, $jsonStr);       fclose($fh);   } ?>

While you are experimenting, you can try them out with free collectors such as http://webhook.site/.

Once you have collected all the webhook data, you can read that into a data store for additional processing.  There are also ways to push Webhooks through services like StitchData and Segment.

The same information is available in the Events API if you have a need to PULL the data and cannot accept PUSH data.  Here is a sample Event API call:
GET https://api.sparkpost.com/api/v1/events/message?/

recipients=recipient@example.com&templates=my-template&events

That API is fully documented with samples here:  https://developers.sparkpost.com/api/events/#events-get-search-for-message-events

If you really need the event data back in a form that looks like PMTA or Momentum logging, that is possible as well if you employ some additional conditioning code. The great news is there are 几个例子 to steal from already.

回顾总结

  1. Make sure you talk to your Sales and Success Management team.  We’ve done this before and can help you through it quickly and cost-effectively.

  2. Figure out if you are in Camp #1 (能够完全从内部部署) or Camp #2 (仍需要一些内部 MTA).

  3. Sign up for a 免费测试帐户 to evaluate the integration details.

  4. Decide on SMTP or REST API injection methods.

  5. 如果你使用SMTP注入,想办法把头数据和消息属性弄到X-MSYS-API头中。

  6. Confirm if you can use our BYOIP process.

  7. 如有必要,用新的域名更新你的DNS。

  8. Build a small sample to test your migration.  You may need to adjust your config.

  9. 加大流量,直到所有的流量都被迁移。

  10. 如果你符合第一阵营,在所有流量迁移后,你终于可以关闭你的内部MTA了。

准备好一睹Bird 的风采了吗?

立即预约演示。

AI-first 营销、服务和支付 CRM

点击 "查看Bird",即表示您同意Bird 的规定。

AI-first 营销、服务和支付 CRM

点击 "查看Bird",即表示您同意Bird 的规定。

AI-first 营销、服务和支付 CRM

点击 "查看Bird",即表示您同意Bird 的规定。