3 Tipps für die Umstellung von Postfix, Sendmail oder Exim auf Bird

3 Tipps für die Umstellung von Postfix, Sendmail oder Exim auf Bird

3 Tipps für die Umstellung von Postfix, Sendmail oder Exim auf Bird

Aug 3, 2018

Herausgegeben von

Herausgegeben von

Tom Mairs

Tom Mairs

-

Kategorie:

Kategorie:

E-Mail

E-Mail

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 “Wie versende ich eine E-Mail?” and “Woher weiß ich, was mit der E-Mail passiert ist?”  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.  Die rest of this document assumes you have an existing SparkPost account.


Wie versende ich E-Mails?

Bird akzeptiert E-Mails zur Übertragung auf verschiedene Weise. Die bei weitem gebräuchlichste ist SMTP (Simple Mail Transfer Protocol), und Bird präsentiert sich genau wie jeder andere sichere E-Mail-Agent auf Port 587. Wenn Sie derzeit über eine Software zur Erstellung von E-Mails verfügen, wird Bird diese als Standard-SMTP-Nachricht akzeptieren und versuchen, sie zuzustellen. Sie benötigen ein System mit einem gültigen TLS-Zertifikat, das SMTP-Nachrichten erstellen und über Port 587 senden kann. Postfix, Sendmail und Exim verfügen alle über diese Fähigkeit von Haus aus.


Beispiel 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
· Ja, es ist wirklich so einfach


Beispiel 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


Was ist mit REST-Injektion?

Für Kunden, die HTTP(S) für den Datentransport in ihren Netzwerken verwenden, kann die Konvertierung einer Nachricht in SMTP mühsam sein. Bird verfügt über eine umfassende REST-API, die eine JSON-Vorlage, eine Liste von Empfängern und Ersetzungsdaten über HTTPS akzeptieren kann und diese dann in generierte (zusammengeführte) E-Mails umwandelt, die über Standard-SMTP in die Welt geschickt werden. Dies ist besonders hilfreich, um die Generierungsarbeit von Webservern auf die E-Mail-Engine zu verlagern.


Beispiel:

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


Wie erhalte ich Lieferinformationen?

Bird sammelt große Mengen an Zustellungsinformationen und stellt Ihnen diese im JSON-Format zur Verfügung, das als Webhook "gepusht" oder mit einem API-Aufruf "gezogen" werden kann. Die Daten für eine Lieferung sehen etwa so aus:


{      "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" }


Das sind wahrscheinlich viel mehr Daten, als Sie in einem Postfix-Protokoll zu sehen gewohnt sind, und sie liegen bereits in einem Format vor, das leicht zu verarbeiten ist. Es ist relativ trivial, diese JSON-Daten bei Bedarf in das Postfix-Protokollierungsformat zu konvertieren. Zustellungs-, Bounce-, Reject-, spam_complaint-, open-, click- und delay-Daten können auf die gleiche Weise gelesen werden.


Beispiele:

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

Die right message -> zum right person -> am right time.

By clicking "See Bird" you agree to Bird's Hinweis zum Datenschutz.

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

The right message -> zum right person -> am right time.

By clicking "See Bird" you agree to Bird's Hinweis zum Datenschutz.