3 Tips Saat Migrasi ke Bird dari Postfix, Sendmail, atau Exim

3 Tips Saat Migrasi ke Bird dari Postfix, Sendmail, atau Exim

3 Tips Saat Migrasi ke Bird dari Postfix, Sendmail, atau Exim

Aug 3, 2018

Diterbitkan oleh

Diterbitkan oleh

Tom Mairs

Tom Mairs

Kategori:

Kategori:

Email

Email

Ready to see Bird
in action?

Ready to see Bird
in action?

3 Tips When Migrating to Bird from Postfix, Sendmail or Exim

This document outlines common ways our customers use Bird for general integration.  These integrations cover essential topics like “bagaimana cara mengirim email?” and “bagaimana cara mengetahui apa yang terjadi pada email tersebut?”  If you are transitioning from Postfix, Sendmail, or Exim, this document should explain everything you need to know about the basics of sending and reporting on email.  The rest of this document assumes you have an existing SparkPost account.


Bagaimana cara mengirim email?

Bird akan menerima email untuk ditransfer dalam beberapa cara. Sejauh ini, yang paling umum adalah SMTP (Simple Mail Transfer Protocol) dan Bird menampilkan dirinya persis seperti agen email aman lainnya pada port 587. Jika saat ini Anda memiliki perangkat lunak pembuat atau penggabung surat yang membuat email untuk pengiriman, Bird akan menerimanya sebagai pesan SMTP standar dan berusaha mengirimkannya. Anda akan membutuhkan sistem dengan sertifikat TLS yang valid yang dapat menghasilkan pesan SMTP dan mengirimkannya melalui port 587. Postfix, Sendmail, dan Exim memiliki kemampuan ini secara bawaan.


Contoh 1:

You have a web server that generates a merged message for email delivery through Postfix.
· Adjust the web server’s generation software to send SMTP message to your assigned SparkPost server instead of the Postfix server
· Ya, memang semudah itu


Contoh 2:

You have some management code that needs to use the local server’s “Mail” function.
· If you are using Sendmail, edit the /etc/mail/sendmail.mc file to add a “smart-host” definition.
IE: define(`SMART_HOST’,`smtp.MyMessageBirdServer.com’)
· If you are using Postfix, edit the /etc/postfix/transport file to add an smtp relay definition.
IE: * smtp:MyMessageBirdServer.com
· Make sure you enable TLS and set your outbound port to 587.
· Apply the changes and restart the local mail services
· Execute the management code as, and the mail will route to MessageBird for delivery


Bagaimana dengan injeksi REST?

Bagi pelanggan yang menggunakan HTTP(S) untuk mengangkut data dalam jaringan mereka, mengonversi pesan ke SMTP bisa jadi merepotkan. Bird memiliki REST API yang komprehensif yang bisa menerima templat JSON, daftar penerima, dan data substitusi melalui HTTPS dan kemudian mengubahnya menjadi email yang dibuat (digabungkan) untuk dikirim ke seluruh dunia melalui SMTP standar. Hal ini sangat membantu untuk melepaskan pekerjaan pembuatan dari server web ke mesin email.


Contoh:

Your servers generate a newsletter to 50,000 recipients daily merging personal data then send each individually through Postfix.
· Create JSON objects for the recipients, substitution data, and content template.
· Use the REST API to POST the JSON objects to Bird’s Transmission API. Doing this offloads the generation process to SparkPost for faster delivery.
· You can even put the JSON in a file and use cURL:

curl -v -H "Content-Type: application/json" -X POST \ https://api.bird.com/api/v1transmissions -d@./newsletter.json


Bagaimana cara mendapatkan informasi pengiriman?

Bird mengumpulkan sejumlah besar informasi pengiriman dan menyediakannya untuk Anda dalam format JSON yang dapat "didorong" sebagai webhook atau "ditarik" dengan panggilan API. Data untuk pengiriman terlihat seperti ini:


{      "campaign_id":"Welcome_Letter",    "customer_id":"108",    "delv_method":"esmtp",    "event_id":"84769964978165188",    "friendly_from":"bounce@sp-send.com",    "ip_address":"50.116.50.117",    "ip_pool":"default",    "message_id":"00046a82565a6d39451a",    "msg_from":"abc-bounces-108@sp-send..com",    "msg_size":"2164",    "num_retries":"0",    "queue_time":"1759",    "raw_rcpt_to":"fakespark+32@deadboltemail.com",    "rcpt_meta":{      },    "rcpt_tags":[      ],    "rcpt_to":"fakespark+32@deadboltemail.com",    "routing_domain":"deadboltemail.com",    "sending_ip":"52.38.47.118",    "subject":"Welcome Letter Template",    "tdate":"2018-01-10T21:15:24.000Z",    "template_id":"welcome-letter",    "template_version":"5",    "transmission_id":"84769964922735103",    "type":"delivery",    "timestamp":"2018-01-10T14:15:24.000-07:00" }


Itu mungkin jauh lebih banyak data daripada yang biasa Anda lihat di log Postfix dan sudah dalam format yang mudah digunakan. Relatif mudah untuk mengonversi data JSON tersebut ke format log Postfix jika diperlukan. Data pengiriman, bounce, reject, spam_complaint, open, click, dan delay dapat dibaca dengan cara yang sama.


Contoh:

1) You usually export Postfix logs out to Excel so you can sort and analyze.
A) Execute a message_events API call and run the resulting JSON data through JSON2CSV.


2) You like to convert your Postfix logs to JSON, then pull them into a web service for reading and analysis.
A) Use the MessageBird metrics API to poll SparkPost for the data you need, and it is automatically exported as JSON


3) You have a separate process that tails and parses the logs in real-time and updates a separate recipient database.
A) SparkPost can provide a real-time webhook that can feed your process spam_complaintants and unsubscribes specifically for this purpose. Implementation is trivial.


-Tom

Your new standard in Marketing, Pay & Sales. It's Bird

The right message -> ke right person -> di right time.

By clicking "See Bird" you agree to Bird's Pemberitahuan Privasi.

Your new standard in Marketing, Pay & Sales. It's Bird

The right message -> ke right person -> di right time.

By clicking "See Bird" you agree to Bird's Pemberitahuan Privasi.