mirror of
https://github.com/postalserver/postal.git
synced 2026-10-18 10:17:22 +00:00
131 lines
6.0 KiB
Plaintext
131 lines
6.0 KiB
Plaintext
- if @server
|
|
- page_title << @server.name
|
|
- page_title << @domain.name
|
|
- page_title << "DNS Setup"
|
|
|
|
|
|
- if @server
|
|
= render 'servers/sidebar', :active_server => @server
|
|
= render 'servers/header', :active_nav => :domains
|
|
= render 'nav', :active_nav => :domains
|
|
- else
|
|
.pageHeader
|
|
%h1.pageHeader__title
|
|
%span.pageHeader__titlePrevious
|
|
= @organization.name
|
|
→ Domains →
|
|
= @domain.name
|
|
= render 'organizations/nav', :active_nav => :domains
|
|
|
|
.pageContent.pageContent--compact
|
|
%h2.pageContent__title DNS Setup for #{@domain.name}
|
|
%p.pageContent__intro.u-margin
|
|
Follow the instructions below to configure SPF & DKIM records for this domain.
|
|
We highly recommend that you do this to ensure your messages are delivered
|
|
correctly and quickly.
|
|
|
|
.u-margin.buttonSet
|
|
= link_to "Check my records are correct", [:check, organization, @server, @domain], :remote => true, :method => :post, :class => 'button'
|
|
= link_to "Back to domain list", [organization, @server, :domains], :class => 'button button--neutral'
|
|
- if @domain.dns_checked_at
|
|
%p.u-margin We last checked the validity of your DNS records #{distance_of_time_in_words_to_now @domain.dns_checked_at} ago.
|
|
|
|
%h3.pageContent__subTitle SPF Record
|
|
- if @domain.spf_status == 'OK'
|
|
%p.pageContent__text.u-green.u-bold
|
|
%span.label.label--green Good
|
|
Your SPF record looks good!
|
|
- elsif !@domain.spf_status.nil?
|
|
%p.pageContent__text.u-orange.u-bold
|
|
%span.label.label--orange Warning
|
|
= @domain.spf_error
|
|
|
|
%p.pageContent__text
|
|
You need to add a TXT record at the apex/root of your domain (@) with the following
|
|
content. If you already send mail from another service, you may just need to add
|
|
<b>include:#{Postal::Config.dns.spf_include}</b> to your existing record.
|
|
%pre.codeBlock.u-margin= @domain.spf_record
|
|
|
|
%h3.pageContent__subTitle DKIM Record
|
|
- if @domain.pending_dkim_key?
|
|
%p.pageContent__text.u-orange.u-bold
|
|
%span.label.label--orange Key change in progress
|
|
You've generated a new DKIM key which isn't active yet. Both records are shown below.
|
|
- elsif @domain.dkim_status == 'OK'
|
|
%p.pageContent__text.u-green.u-bold
|
|
%span.label.label--green Good
|
|
Your DKIM record looks good!
|
|
- elsif !@domain.dkim_status.nil?
|
|
%p.pageContent__text.u-orange.u-bold
|
|
%span.label.label--orange Warning
|
|
= @domain.dkim_error
|
|
|
|
- if @domain.pending_dkim_key?
|
|
%p.pageContent__text.u-bold
|
|
%span.label.label--green Current
|
|
Keep this record exactly as it is
|
|
%p.pageContent__text
|
|
This is the record you already have published at <b>#{@domain.dkim_record_name}</b>.
|
|
It's signing your mail right now, so leave it in place.
|
|
%pre.codeBlock.u-margin= @domain.dkim_record
|
|
|
|
%p.pageContent__text.u-bold
|
|
%span.label.label--orange New
|
|
Add this record as well
|
|
%p.pageContent__text
|
|
Add a <b>second</b> TXT record with the name <b>#{@domain.pending_dkim_record_name}</b>
|
|
and the content below, alongside the record above rather than replacing it. Once we detect
|
|
it (checked hourly, or when you use the button above) we'll switch to signing with the new
|
|
key automatically. After the switch, keep the old record published while messages signed
|
|
with it may still be queued, held, or available for redelivery.
|
|
%pre.codeBlock.u-margin= @domain.pending_dkim_record
|
|
%p.pageContent__text
|
|
= link_to "Cancel new DKIM key", [:cancel_dkim_regeneration, organization, @server, @domain], :remote => true, :method => :post, :data => { :confirm => "Are you sure? The new key will be discarded and your existing key will remain active." }, :class => 'button button--neutral'
|
|
- else
|
|
%p.pageContent__text
|
|
You need to add a new TXT record with the name <b>#{@domain.dkim_record_name}</b>
|
|
with the following content.
|
|
%pre.codeBlock.u-margin= @domain.dkim_record
|
|
%p.pageContent__text
|
|
= link_to "Regenerate DKIM key", [:regenerate_dkim, organization, @server, @domain], :remote => true, :method => :post, :data => { :confirm => "Are you sure you wish to generate a new DKIM key? You'll need to add a new DNS record before the new key can be used." }, :class => 'button button--neutral'
|
|
|
|
%h3.pageContent__subTitle Return Path
|
|
- if @domain.return_path_status == 'OK'
|
|
%p.pageContent__text.u-green.u-bold
|
|
%span.label.label--green Good
|
|
Your return path looks good. We'll use this when sending e-mail from this domain.
|
|
- elsif @domain.return_path_status == 'Missing'
|
|
%p.pageContent__text.u-grey.u-bold
|
|
%span.label.label--grey OK
|
|
There's no return path for this domain. This is OK but we recommend adding the record to improve deliverability and achieve DMARC alignment.
|
|
- elsif !@domain.return_path_status.nil?
|
|
%p.pageContent__text.u-orange.u-bold
|
|
%span.label.label--orange Warning
|
|
= @domain.return_path_error
|
|
|
|
%p.pageContent__text
|
|
This is optional but we recommend adding this to improve deliverability. You should add
|
|
a <b>CNAME</b> record at <b>#{@domain.return_path_domain}</b> to point to the hostname below.
|
|
%pre.codeBlock.u-margin= Postal::Config.dns.return_path_domain
|
|
|
|
|
|
%h3.pageContent__subTitle MX Records
|
|
- if @domain.mx_status == 'OK'
|
|
%p.pageContent__text.u-green.u-bold
|
|
%span.label.label--green Good
|
|
Your MX records look like they're good to go!
|
|
- elsif @domain.mx_status == 'Missing'
|
|
%p.pageContent__text.u-grey.u-bold
|
|
%span.label.label--grey OK
|
|
None of the MX records for this domain point to us. Incoming mail won't be sent to us.
|
|
- elsif !@domain.mx_status.nil?
|
|
%p.pageContent__text.u-orange.u-bold
|
|
%span.label.label--orange Warning
|
|
= @domain.mx_error
|
|
|
|
%p.pageContent__text
|
|
If you wish to receive incoming e-mail for this domain, you need to add the following MX records
|
|
to the domain. You don't have to do this and we'll only tell you if they're set up or not. Both
|
|
records should be priority <b>10</b>.
|
|
%pre.codeBlock.u-margin= Postal::Config.dns.mx_records.join("\n")
|