MailLandDocs
النطاقات

إعداد DNS

تهيئة سجلات SPF و DKIM و DMARC لنطاق الإرسال الخاص بك

بعد إضافة النطاق، قم بتهيئة سجلات DNS المطلوبة للمصادقة على البريد الإلكتروني. تتطلب MailLand سجلات SPF وDKIM وDMARC؛ يجب أن تتحقق الثلاثة جميعًا قبل أن تتمكن من الإرسال. سجل مسار العودة (الارتداد) المخصص جزء من التحقق من النطاق ومفعّل افتراضيًا للنطاقات الجديدة؛ لا يمنع الإرسال، وإلى أن يتم التحقق منه يستخدم MailLand مسار العودة الافتراضي. نطاق التتبع اختياري.

الحصول على تعليمات DNS

استرجع السجلات الدقيقة لنطاقك:

GET https://api.mail.land/v1/domains/{id}/dns-instructions

قم بالمصادقة باستخدام Authorization: Bearer <token> أو X-API-Key: <api key>.

Get DNS instructions
curl https://api.mail.land/v1/domains/k3v9x2m8q1w7z4/dns-instructions \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
DNS instructions response
{
  "domain": "yourdomain.com",
  "spfRecord": {
    "recordType": "TXT",
    "hostName": "@",
    "value": "v=spf1 include:spf.mlnd.net ~all",
    "status": "pending",
    "instructions": "Add this TXT record to your domain's root. If you have an existing SPF record, add 'include:spf.mlnd.net' to it instead of creating a new record."
  },
  "dkimRecord": {
    "recordType": "TXT",
    "hostName": "mlnd._domainkey",
    "value": "v=DKIM1; k=rsa; p=MIIBIjANBgkq...",
    "status": "pending",
    "instructions": "Add this TXT record with hostname 'mlnd._domainkey' to enable DKIM signing."
  },
  "dmarcRecord": {
    "recordType": "TXT",
    "hostName": "_dmarc",
    "value": "v=DMARC1; p=quarantine; pct=100; adkim=r; aspf=r; rua=mailto:[email protected]; sp=none",
    "status": "pending",
    "instructions": "Add this TXT record at the '_dmarc' subdomain to enable DMARC policy. The rua tag sends aggregate reports to a MailLand address. MailLand stores the reports for this domain for your plan's retention period and makes their DMARC pass rate, sending sources and dispositions available through the API (GET /v1/domains/{id}/dmarc/summary and /dmarc/sources). To also receive the reports yourself, add your own address to the rua tag."
  },
  "trackingRecord": {
    "recordType": "CNAME",
    "hostName": "track",
    "value": "track.mlnd.net",
    "status": "pending",
    "instructions": "Custom Tracking Links"
  },
  "bounceRecords": [
    {
      "recordType": "CNAME",
      "hostName": "bounce",
      "value": "bounce.mlnd.net",
      "status": "pending",
      "instructions": "Bounce Domain (Return-Path) DNS-only (not proxied): a proxied record hides the CNAME from mail servers."
    }
  ],
  "notes": [
    "DNS changes can take up to 48 hours to propagate globally.",
    "After adding records, click 'Verify Domain' to check the configuration.",
    "All three records (SPF, DKIM, DMARC) must be verified to start sending emails.",
    "Use your DNS provider's documentation for specific instructions on adding TXT records."
  ]
}

يتضمن كل سجل حقل status يشير إلى ما إذا كان قد تم اكتشافه في DNS:

الحالةالوصف
pendingلم يُفحص بعد
validالسجل موجود وصحيح
invalidالسجل مفقود أو غير صحيح

لا يُعاد trackingRecord إلا عند تفعيل نطاق التتبع المخصص، ولا يُعاد bounceRecords إلا عند تفعيل نطاق الارتداد المخصص.

سجلات التتبع والارتداد تُظهر pending حتى يتم التحقق منها، حتى بعد فشل الفحص.

السجلات المطلوبة

SPF (إطار سياسة المُرسِل)

يُخوّل SPF خوادم MailLand لإرسال البريد الإلكتروني نيابةً عن نطاقك.

الحقلالقيمة
النوعTXT
الاسمyourdomain.com (أو @)
القيمةv=spf1 include:spf.mlnd.net ~all
TTL3600

إذا كان لديك بالفعل سجل SPF، أضف include:spf.mlnd.net قبل آلية ~all أو -all. يسمح SPF بسجل TXT واحد فقط لكل نطاق: وجود سجلات SPF متعددة يتسبب في فشل المصادقة.

مثال على SPF موجود:

# Before
v=spf1 include:_spf.google.com ~all

# After
v=spf1 include:_spf.google.com include:spf.mlnd.net ~all

DKIM (البريد المعرَّف بمفاتيح النطاق)

يضيف DKIM توقيعاً تشفيرياً لكل بريد إلكتروني، مما يتيح للمستقبلين التحقق من أن الرسالة لم تتغير أثناء النقل.

الحقلالقيمة
النوعTXT
الاسمmlnd._domainkey.yourdomain.com
القيمةv=DKIM1; k=rsa; p=MIIBIjANBgkq... (مفتاحك العام)
TTL3600

تُنشئ MailLand زوج مفاتيح RSA بحجم 2048 بت عند إضافة نطاق. المحدد الافتراضي هو mlnd. يتم توفير القيمة الكاملة للمفتاح العام في استجابة تعليمات DNS.

المفاتيح العامة لـ DKIM طويلة (تقريباً 400 حرف). يقوم بعض مزودي DNS بتقسيم سجلات TXT إلى أجزاء من 255 حرفاً. يتعامل معظم المزودين مع هذا تلقائياً: إذا لم يفعل مزودك ذلك، قم بتغليف القيمة بين علامتَي اقتباس مزدوجتين وسيقوم المزود بدمجها.

DMARC (إلزامي)

يخبر DMARC خوادم البريد المستقبِلة بما يجب فعله عند فشل فحوصات SPF أو DKIM. DMARC إلزامي: يفشل التحقق دون سجل _dmarc يبدأ بـ v=DMARC1 ويحتوي على p=.

الحقلالقيمة
النوعTXT
الاسم_dmarc.yourdomain.com
القيمةاستخدم القيمة الدقيقة من استجابة dns-instructions أعلاه (تتضمن عنوان تقارير فريدًا لكل نطاق)
TTL3600

خيارات سياسة DMARC:

السياسةالسلوك
p=noneمراقبة فقط: لا إجراء عند الفشل (مناسب للإعداد الأولي)
p=quarantineإرسال الفشل إلى مجلد البريد المزعج (نقطة البداية الموصى بها)
p=rejectحجب الفشل تماماً (الأشد صرامة، أفضل حماية)

تعالج Mail.Land تقارير DMARC التجميعية الخاصة بنطاقك. انشر القيمة الواردة في استجابة dns-instructions كما هي. عنوان rua فيها (dmarc+<id>@rpt.mail.land) هو مستقبِل التقارير لدى Mail.Land. تُخزَّن تقارير ذلك النطاق أو أي نطاق فرعي منه طوال فترة الاحتفاظ الخاصة بخطتك، وتتوفر نسبة نجاح DMARC ومصادر الإرسال والإجراءات المطبقة عبر الواجهة البرمجية: GET /v1/domains/{id}/dmarc/summary وGET /v1/domains/{id}/dmarc/sources. لا توجد لها صفحة في لوحة التحكم بعد. لتلقي التقارير بنفسك أيضاً، أضف عنوانك الخاص إلى الوسم نفسه: rua=mailto:dmarc+<id>@rpt.mail.land,mailto:[email protected].

السجلات الاختيارية

مسار العودة المخصص (نطاق الارتداد)

نطاق الارتداد المخصص جزء من التحقق من النطاق ومفعّل افتراضيًا لكل نطاق جديد: يرسل MailLand رسائلك بمسار عودة (Return-Path، وهو عنوان «mailed-by») على نطاقك الفرعي، بحيث يتوافق SPF مع نطاقك. أضف سجل CNAME واحدًا:

الحقلالقيمة
النوعCNAME
الاسمbounce.yourdomain.com
القيمةbounce.mlnd.net
TTL3600

تتبع خوادم البريد سجل CNAME هذا إلى خادم بريد MailLand وسجل SPF الخاص به، لذا لا تضف سجلات MX أو TXT على هذا الاسم.

يجب أن يكون السجل بوضع DNS فقط (بدون وكيل). السجل الممرَّر عبر وكيل، مثل السحابة البرتقالية في Cloudflare، يخفي CNAME عن خوادم البريد فيفشل التحقق. لا تستخدم سجل MX يشير إلى bounce.mlnd.net: هذا المضيف لا يستقبل البريد.

يعيد MailLand التحقق من هذا السجل بانتظام. إذا حُذف السجل أو تغيّر، لا يعود نطاق الارتداد المخصص موثَّقًا، وتتلقى إشعارًا، وتستخدم رسائلك مسار العودة الافتراضي لـ MailLand إلى أن تتحقق من السجل مجددًا. كما يتطلب إيقاف الإعداد ثم تشغيله مجددًا التحقق من السجل مرة أخرى.

يمكنك إيقاف نطاق الارتداد المخصص في إعدادات النطاق، لكن فقط بعد تأكيد تحذير: يرسل النطاق حينها تحت غلاف الارتداد المشترك لـ MailLand، ولا يتوافق SPF مع نطاقك، وتتشارك سمعة الغلاف مع مرسلين آخرين. تُعلَّم النطاقات التي أوقفته لمشغلي MailLand. النطاقات المنشأة قبل أن يصبح هذا الخيار افتراضيًا تحتفظ بإعدادها الحالي؛ فعّله في إعدادات النطاق للحصول على السجل.

CNAME التتبع

إذا كنت تستخدم نطاقاً فرعياً مخصصاً للتتبع، أضف CNAME:

الحقلالقيمة
النوعCNAME
الاسمtrack.yourdomain.com
القيمةtrack.mlnd.net
TTL3600

يجب أن يكون السجل بوضع DNS فقط (بدون وكيل). السجل الممرَّر عبر وكيل، مثل السحابة البرتقالية في Cloudflare، يجيب بشهادة أخرى، فتتوقف روابط التتبع ورابط إلغاء الاشتراك عن العمل. بعد التحقق من سجل CNAME، يطلب MailLand الشهادة ويتحقق من HTTPS على هذا المضيف. تستمر الروابط باستخدام مضيف التتبع الافتراضي لـ MailLand إلى أن ينجح هذا التحقق. إذا استمر الفشل، يصلك إشعار بذلك. تتم إعادة التحقق من سجل CNAME كل ساعة. عبر واجهة API أرسل useCustomBounce: false مع acknowledgeSharedBounceRisk: true؛ بدون ذلك يُرفض الطلب برمز BOUNCE_OPT_OUT_NOT_ACKNOWLEDGED.

MX الوارد

إذا كنت تستخدم معالجة البريد الإلكتروني الوارد:

الحقلالقيمة
النوعMX
الاسمالجذر (@) افتراضيًا، أو inboundSubdomain الخاص بك (مثل in) إذا قمت بتعيينه في إعدادات النطاق. يحافظ النطاق الفرعي على مزود صندوق بريدك الحالي عند الجذر، ويُقبل البريد إلى كل من النطاق الفرعي والجذر.
القيمةmx.mlnd.net
الأولوية10
TTL3600

أدلة مزودي DNS

  1. سجّل الدخول إلى لوحة تحكم Cloudflare
  2. اختر نطاقك
  3. اذهب إلى DNS → Records
  4. انقر على Add Record لكل سجل
  5. بالنسبة لسجلات TXT، اضبط حالة البروكسي على DNS only (سحابة رمادية)
  6. بالنسبة لسجلات CNAME، اضبط حالة البروكسي على DNS only: قد يتداخل CNAME عبر البروكسي مع مصادقة البريد الإلكتروني

التحقق من سجلات DNS

بعد إضافة السجلات، تحقق من انتشارها:

GET https://api.mail.land/v1/domains/{id}/dns-records
Check DNS records
curl https://api.mail.land/v1/domains/k3v9x2m8q1w7z4/dns-records \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
DNS records response
{
  "domain": "yourdomain.com",
  "spfRecord": {
    "recordType": "TXT",
    "hostName": "@",
    "value": "v=spf1 include:spf.mlnd.net ~all",
    "status": "valid",
    "instructions": "Add this TXT record to your domain's root. If you have an existing SPF record, add 'include:spf.mlnd.net' to it instead of creating a new record."
  },
  "dkimRecord": {
    "recordType": "TXT",
    "hostName": "mlnd._domainkey",
    "value": "v=DKIM1; k=rsa; p=MIIBIjANBgkq...",
    "status": "valid",
    "instructions": "Add this TXT record with hostname 'mlnd._domainkey' to enable DKIM signing."
  },
  "dmarcRecord": {
    "recordType": "TXT",
    "hostName": "_dmarc",
    "value": "v=DMARC1; p=quarantine; pct=100; adkim=r; aspf=r; rua=mailto:[email protected]; sp=none",
    "status": "valid",
    "instructions": "Add this TXT record at the '_dmarc' subdomain to enable DMARC policy. The rua tag sends aggregate reports to a MailLand address. MailLand stores the reports for this domain for your plan's retention period and makes their DMARC pass rate, sending sources and dispositions available through the API (GET /v1/domains/{id}/dmarc/summary and /dmarc/sources). To also receive the reports yourself, add your own address to the rua tag."
  },
  "trackingRecord": {
    "recordType": "CNAME",
    "hostName": "track",
    "value": "track.mlnd.net",
    "status": "valid",
    "instructions": "Custom Tracking Links"
  },
  "bounceRecords": [
    {
      "recordType": "CNAME",
      "hostName": "bounce",
      "value": "bounce.mlnd.net",
      "status": "valid",
      "instructions": "Bounce Domain (Return-Path) DNS-only (not proxied): a proxied record hides the CNAME from mail servers."
    }
  ],
  "notes": [
    "DNS changes can take up to 48 hours to propagate globally.",
    "After adding records, click 'Verify Domain' to check the configuration.",
    "All three records (SPF, DKIM, DMARC) must be verified to start sending emails.",
    "Use your DNS provider's documentation for specific instructions on adding TXT records."
  ]
}

قد يستغرق انتشار DNS من بضع دقائق إلى 48 ساعة، اعتماداً على مزود DNS الخاص بك وقيمة TTL للسجلات الموجودة. يقوم معظم المزودين بالانتشار في غضون 5 إلى 15 دقيقة.

الخطوات التالية

في هذه الصفحة