1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-20 06:39:47 +00:00

initial commit from appmail

هذا الالتزام موجود في:
Adam Cooke
2017-04-19 13:07:25 +01:00
الأصل a3eff53792
التزام 2fdba0ceb5
474 ملفات معدلة مع 51228 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,4 @@
.navBar.navBar--secondary
%ul
%li.navBar__item= link_to "Domains", organization_server_domains_path(organization, @server), :class => ['navBar__link', active_nav == :domains ? 'is-active' : '']
%li.navBar__item= link_to "Tracking Domains", organization_server_track_domains_path(organization, @server), :class => ['navBar__link', active_nav == :track_domains ? 'is-active' : '']

عرض الملف

@@ -0,0 +1,13 @@
%p.pageContent__intro.u-margin
To verify your ownership of <b>#{@domain.name}</b>, you need to add a TXT record to this domain.
The TXT record should include the value shown below.
%pre.codeBlock.u-margin= @domain.dns_verification_string
%p.pageContent__intro.u-margin
Once you've added this, click the button below to verify the presence of this record and
verify your domain.
.buttonSet
= link_to "Verify TXT record", [:verify, organization, @server, @domain], :remote => true, :method => :post, :class => "button"
= link_to "Back to domain list", [organization, @server, :domains], :class => "button button--neutral"

عرض الملف

@@ -0,0 +1,25 @@
- if params[:email_address]
%p.pageContent__intro.u-margin
We've sent an email to <b>#{params[:email_address]}</b>. Please check your e-mail and enter
the code you've been sent in the box below.
= form_tag request.fullpath, :remote => true do
= hidden_field_tag 'email_address', params[:email_address]
%p.u-margin
= text_field_tag "code", params[:code], :autofocus => true, :class => 'input input--text js-multibox'
.buttonSet
= submit_tag "Verify this domain", :class => 'button js-form-submit'
= link_to "Back to domain list", [organization, @server, :domains], :class => "button button--neutral"
- else
%p.pageContent__intro.u-margin
To verify your ownership of <b>#{@domain.name}</b> by e-mail, choose an e-mail address from the list
below. We'll then send you an email with a code which you'll need to enter below.
= form_tag request.fullpath, :remote => true do
%p.u-margin
= select_tag "email_address", options_for_select(@domain.verification_email_addresses), :class => 'input input--select', :autofocus => true
%p.buttonSet
= submit_tag "Continue", :class => 'button'
= link_to "Back to domain list", [organization, @server, :domains], :class => "button button--neutral"

عرض الملف

@@ -0,0 +1,74 @@
- if @server
- page_title << @server.name
- page_title << "Domains"
- 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
&rarr;
Domains
= render 'organizations/nav', :active_nav => :domains
.pageContent.pageContent--compact
- if @domains.empty?
.noData.noData--penguin.noData--clean
%h2.noData__title Brrrr. It's chilly in here without any domains.
%p.noData__text
To send & receive messages you need to add & verify the domain you wish to send/receive
messages to/from. Add your domain below to get started.
%p.noData__button= link_to "Add your first domain", [:new, organization, @server, :domain], :class => "button button--positive"
- else
%ul.domainList.u-margin
- for domain in @domains
%li.domainList__item
.domainList__details
%p.domainList__name
= link_to domain.name, [:setup, organization, @server, domain]
- if domain.use_for_any?
%span.label.label--blue Any
%ul.domainList__checks
- if domain.spf_status == 'OK'
%li.domainList__check.domainList__check--ok SPF
- elsif domain.spf_status.nil?
- else
%li.domainList__check.domainList__check--warning{:title => domain.spf_error}= link_to "SPF", [:setup, organization, @server, domain]
- if domain.dkim_status == 'OK'
%li.domainList__check.domainList__check--ok DKIM
- elsif domain.dkim_status.nil?
- else
%li.domainList__check.domainList__check--warning{:title => domain.dkim_error}= link_to "DKIM", [:setup, organization, @server, domain]
- if domain.mx_status == 'OK'
%li.domainList__check.domainList__check--ok MX
- elsif domain.mx_status.nil?
- else
%li.domainList__check.domainList__check--neutral-cross{:title => domain.mx_error}= link_to "MX", [:setup, organization, @server, domain]
- if domain.return_path_status == 'OK'
%li.domainList__check.domainList__check--ok Return Path
- elsif domain.return_path_status.nil?
- elsif domain.return_path_status == 'Missing'
%li.domainList__check.domainList__check--neutral{:title => domain.return_path_error}= link_to "Return Path", [:setup, organization, @server, domain]
- else
%li.domainList__check.domainList__check--warning{:title => domain.return_path_error}= link_to "Return Path", [:setup, organization, @server, domain]
%ul.domainList__properties
- if domain.verified?
%li.domainList__verificationTime Verified on #{domain.verified_at.to_s(:long)}
- else
%li= link_to "Verify this domain", [:verify, organization, @server, domain], :class => "domainList__verificationLink"
%li.domainList__links
- if domain.verified?
= link_to "DNS setup", [:setup, organization, @server, domain]
= link_to "Delete", [organization, @server, domain], :remote => :delete, :method => :delete, :data => {:confirm => "Are you sure you wish to remove this domain?", :disable_with => "Deleting..."}, :class => 'domainList__delete'
%p.u-center= link_to "Add new domain", [:new, organization, @server, :domain], :class => "button button--positive"

عرض الملف

@@ -0,0 +1,35 @@
- if @server
- page_title << @server.name
- page_title << "Add Domain"
- 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
&rarr; Domains &rarr;
Add new domain
= render 'organizations/nav', :active_nav => :domains
.pageContent.pageContent--compact
= form_for [organization, @server, @domain], :remote => true do |f|
= f.error_messages
%fieldset.fieldSet
.fieldSet__field
= f.label :name, :class => 'fieldSet__label'
.fieldSet__input= f.text_field :name, :autofocus => true, :class => 'input input--text'
.fieldSet__field
= f.label :verification_method, :class => 'fieldSet__label'
.fieldSet__input
= f.select :verification_method, Domain::VERIFICATION_METHODS, {}, :class => 'input input--select'
.fieldSet__text
Choose how you'd like to verify your ownership of this domain. If you choose <b>E-Mail</b> we can send you
an email with a code whcih you'll need to enter - you can choose from a set of pre-defined addresses for
the domain. Using <b>DNS</b> you'll need to add a TXT record on this domain using your DNS provider.
.fieldSetSubmit
= f.submit :class => "button button--positive js-form-submit"

عرض الملف

@@ -0,0 +1,104 @@
- 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
&rarr; Domains &rarr;
= @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.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
%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
%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
%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")

عرض الملف

@@ -0,0 +1,21 @@
- if @server
- page_title << @server.name
- page_title << @domain.name
- page_title << "Verify"
- 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
&rarr; Domains &rarr;
= @domain.name
= render 'organizations/nav', :active_nav => :domains
.pageContent.pageContent--compact
= render :partial => "verify_with_#{@domain.verification_method.underscore}"