Computer >> Hướng Dẫn Máy Tính >  >> Phần Mềm >> Thư Điện Tử

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

Yêu cầu thiết lập:

  • Domain Name System (DNS) Editor (ví dụ: GoDaddy Admin có email addresses registered)
  • 3rd Party e-mail Admin Accounts (e-mail Blast Service [Mailchimp, ConstantContact, etc.], Additional Mail Server bạn dùng, etc.)

Bạn đọc bài này có thể vì muốn giải quyết error vừa nhận. Error có thể nói về DMARC records và email không authenticated. Và rất có thể bạn vừa cố gắng email ai đó với '@gmail.com' hoặc '@yahoo.com' hoặc free big email providers tương tự có default guidelines cao hơn email server tự setup qua công ty.

Tôi cũng từng ở đó và struggle khá lâu để hiểu - không chỉ cần gì, mà cả cách làm đúng.

Thống kê trước và sau cấu hình SPF, DMARC & DKIM:

Như bạn thấy trong hình sau, implementations cho thấy:

  • Bounce Rate 70% trước implementation, tổng 21.441 Email không bao giờ vào inbox subscriber.
  • Sau implementation Bounce Rate chỉ 5.6%, xuống còn 1.855 Bouncebacks.
  • Bouncebacks không toàn do security, một số email bị xóa hoặc subscriber typo (mail.com thay gmail.com là typical).

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

Constant Contact Bounce Statistics, Before & After cấu hình SPF, DMARC & DKIM.

Đủ nói về tầm quan trọng - bắt tay vào làm!

Để 100% compliant về email authentication, cần 3 thứ cấu hình:

  • SPF (Sender Policy Framework): framework ngăn email forgery aka Spoofing. Spoofing là khi ai đó giả mạo gửi từ email của bạn.
  • DKIM (DomainKeys Identified Mail): Cho phép server gửi email thay tên bạn authenticated đảm bảo đúng bạn. Ví dụ: dùng MailChimp/ConstantContact cho newsletter blasts nói từ 'john@doecompany.com', email vẫn gửi từ server MailChimp/ConstantContact. Tuy nhiên, bạn verified với Blast email service rằng đúng bạn, không phải kẻ giả mạo. Đây là quan trọng nhất setup đúng cho businesses, nếu không bounce-back rate cao!
  • DMARC (Domain-based Message Authentication, Reporting, and Conformance): Anti-Spoofing mechanism làm việc cùng SPF. Chỉ có một là ineffective — cần cả hai để properly protected.

DNS Editor / DNS Zone Editor, GoDaddy Screenshot Examples (Login và navigate Admin Dashboard trước):

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy Manage Domains Dashboard Screenshot với mũi tên chỉ Manage option. (1)

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy Domains Dashboard Screenshot với mũi tên chỉ Manage Zones option. (1)

Chọn Domain cần thêm DNS entries sau khi click Manage Zones.

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy DNS Zone Editor Admin Dashboard Screenshot với mũi tên chỉ Add Option. (1)

Dưới records bên phải, thấy nút 'Add' dẫn đến dialog menu nhập SPF, DMARC & DKIM entries từng cái:

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy Add DNS Entry Admin Dashboard Screenshot với nút chỉ Save button và TXT as type, _dmarc as Host và required value under TXT Value highlighted. (1)

Cho guides khác Zone Editors, vào knowledge base/support center Domain Provider.

Thiết lập SPF:

SPF dễ setup nhất. Cần 2 thứ:

  1. DNS Editor (GoDaddy Admin Portal)
  2. IP address của email server

Truy cập DNS Editor (cũng gọi DNS Zone Editor trong CPanel), tạo new TXT entry. Trong TXT Entry, 3 fields có thể: Host, TXT Value / Value & TTL (Time-To-Live). Nhập sau (có thể khác, dựa trên GoDaddy installation):
Host: @
TXT Value: v=spf1 +a +mx +ip4:<ip of your e-mail server>~all
TTL: 1 Hour

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy DNS Sample TXT Entry cho SPF settings như trên.

Giải thích / Ý nghĩa settings:

'@' là designation trong GoDaddy refer đến Domain bạn làm việc. Nếu làm việc trong 'doecompany.com', thay '@' bằng 'doecompany.com' kết quả giống nhau. Tuy nhiên, best practice dùng '@' symbol trong GoDaddy.

<ip of your e-mail server> là IP nơi email gửi từ. Không nhất thiết cùng IP website hosted.

+a: Include A record

+mx: Include Mail Server record

+ip4: Chỉ định IPv4 server

~all: Records ngoài prior declared ones sẽ fail.

TTL = 1 hour (hoặc 3600 seconds): Time-To-Live, bao lâu expire. Nếu đổi email servers, bạn vui vì chỉ max 1 hour gap not authenticated.

Thiết lập DKIM:

Đây là tedious nhất trong ba và critical nhất. Bạn authenticate 3rd party gửi thay tên email bạn, ví dụ 'john@doecompany.com'.

Tôi có 2 DKIMs setup:

  1. Cho actual Mail Server trên server khác website (common trong Enterprise).
  2. Cho email newsletter blast service provider (ConstantContact case, dễ dàng Mailchimp hoặc khác).

Cả hai scenarios, legwork giống nhau. Contact email support của Mail Server hoặc 3rd party email sending service, yêu cầu họ install DKIM cho account bạn.

Hoàn toàn out of your hands, thường 1-2 ngày complete. Cơ bản họ register và install RSA ít nhất 1024-Bit encoding (2048 tốt hơn) trên server.

Sau setup, họ gửi Public Key bạn dùng next step setup DKIM record.

Giống SPF & DMARC records, truy cập DNS Editor (DNS Zone Editor trong CPanel), tạo new TXT entry. 3 fields: Host, TXT Value / Value & TTL. Nhập sau (dựa trên GoDaddy với emails hosted trên inmotionhosting.com và ConstantContact newsletter service). Nhớ tạo 1 entry riêng mỗi DKIM record:
Host: <provided by your 3rd party>._domainkey
TXT Value: v=DKIM1; k=rsa; p=<public key>
TTL: 1 Hour

Đảm bảo không spaces sau '=' symbols.

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy DNS Sample TXT Entry cho DKIM settings.

Giải thích / Ý nghĩa settings:

Host có thể name hoặc number, truly unique to third party. Khi email sent on your behalf, email sẽ có name/number đó trong header. Đó là record nó lookup dưới domain bạn.

Layman terms và example: recipient server đi đến 'doecompany's DNS records check xem 3rd party claim true có đó không. Chỉ nếu public key validate properly với key trên server của họ, emails sẽ sent out.

v=DKIM1: Chỉ định version DKIM dùng clarify further what to look for.

k=rsa: RSA typical nhất dùng làm Key (k). 3rd party có thể opt-in dùng khác. Nhưng RSA 2048 bit encryption là secure option nhất hiện tại. 1024 bit cũng tốt.

p=<public key>: Thay vì '<public key>' bạn provided với 1024 bit hoặc 2048 bit string random text/numbers hoặc values phù hợp encryption 3rd party dùng.

TTL = 1 hour (3600 seconds): Time-To-Live. Nếu đổi email servers, bạn vui vì chỉ max 1 hour gap not authenticated.

Thiết lập DMARC:

Nhắc nhở: DMARC làm việc, PHẢI setup SPF VÀ DKIM trước. Vì DMARC verify SPF & DKIM settings và sender có suit settings không phải spoofer. Nếu SPF & DKIM không setup, DMARC không work và result rejected emails.

Giống SPF records, truy cập DNS Editor (DNS Zone Editor CPanel), tạo new TXT entry. 3 fields: Host, TXT Value / Value & TTL. Nhập sau (dựa trên GoDaddy với emails hosted trên inmotionhosting.com):
Host: _dmarc
TXT Value: v=DMARC1;p=reject;sp=none;adkim=r;aspf=r;pct=100;fo=0;rf=afrf;ri=86400
TTL: 1 Hour

Ngăn chặn Email Marketing Bouncebacks: Cấu hình SPF, DMARC & DKIM thành thạo

GoDaddy DNS Sample TXT Entry cho DMARC settings.

Giải thích / Ý nghĩa settings:

Host khai báo '_dmarc' vì trong GoDaddy tự động thêm '.johndoe.com' làm subdomain. Nghĩa là khi email sent out, DMARC luôn checked under selector đó against domain. Nếu không setup properly '_dmarc', email servers không find DMARC entry và auto fail email vì tin không có entry.

v=DMARC1: Khai báo version DMARC clarify what used, make authentication legitimate hơn.

p=reject: Emails rejected từ recipient email server nếu không match DMARC records.

sp=none: Không check subdomains và main domain aligned settings; optional.

adkim=r: Strict (s) hay relaxed (r) với DKIM identifier settings; relaxed default.

aspf=r: Strict (s) hay relaxed (r) với SPF identifier settings; relaxed default.

pct=100: 100% emails affected by DMARC. Integer 1-100. Smaller set chỉ cho testing; nên 100 cho security.

fo=0: DMARC error report tạo nếu SPF & DKIM fail authenticated. 0 default. Others: 1, d, s. 1 nếu either fails generate record. d nếu signature failed evaluation. s nếu SPF evaluation failed.

rf=afrf: Formatting message failure reports. afrf only supported value tại thời điểm viết.

ri=86400: Seconds giữa gửi reports cho sender. 86400 default = 24 hours/1 ngày. Major mailbox providers (Gmail, Yahoo...) gửi hơn 1 report/ngày.

TTL = 1 hour (3600 seconds): Time-To-Live. Nếu đổi email servers, bạn vui vì chỉ max 1 hour gap not authenticated.

Vậy là cách properly authenticate emails. Hy vọng lấy đi mystery và complication. Bạn trên đường không còn kickbacks từ mailer-daemon!

Tác giả: Andreas Lopez — https://www.linkedin.com/in/andreaslopez/

Editors: Stevan Pupavac — https://www.linkedin.com/in/stevan-pupavac/ | Frederick Alcantara — https://www.linkedin.com/in/frederick-alcantara/

Nguồn: 1. GoDaddy Screenshots by DMARCanalyzer.com: https://www.dmarcanalyzer.com/dmarc/dmarc-record-setup-guides/dmarc-setup-guide-godaddy/