مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-20 06:39:47 +00:00
initial commit from appmail
هذا الالتزام موجود في:
48
app/views/messages/_deliveries.html.haml
Normal file
48
app/views/messages/_deliveries.html.haml
Normal file
@@ -0,0 +1,48 @@
|
||||
%ul.deliveryList
|
||||
- if message.queued_message && message.queued_message.locked?
|
||||
%li.deliveryList__item.deliveryList__item--header
|
||||
%p Message is currently being processed.
|
||||
- elsif message.queued_message && message.queued_message.retry_after
|
||||
%li.deliveryList__item.deliveryList__item--header
|
||||
%p This message will be retried automatically in #{distance_of_time_in_words_to_now message.queued_message.retry_after}.
|
||||
%p= link_to "Retry delivery now", retry_organization_server_message_path(organization, @server, message.id), :class => "button button--small", :remote => true, :method => :post
|
||||
- elsif message.held?
|
||||
%li.deliveryList__item.deliveryList__item--header
|
||||
%p
|
||||
This message has been held. By releasing the message, we will allow it to continue on its way to its destination.
|
||||
- if @message.hold_expiry
|
||||
It will be held until #{@message.hold_expiry.to_s(:long)}.
|
||||
%p.buttonSet
|
||||
= link_to "Release message", retry_organization_server_message_path(organization, @server, message.id), :class => "button button--small", :remote => true, :method => :post
|
||||
= link_to "Cancel hold", cancel_hold_organization_server_message_path(organization, @server, message.id), :class => "button button--small button--danger", :remote => true, :method => :post
|
||||
- elsif @server.mode == 'Development'
|
||||
%li.deliveryList__item.deliveryList__item--header
|
||||
%p This server is in development mode so this message can be redelivered as if it had just been received.
|
||||
%p= link_to "Redeliver message", retry_organization_server_message_path(organization, @server, message.id), :class => "button button--small", :remote => true, :method => :post
|
||||
|
||||
- if message.deliveries.empty?
|
||||
%li.deliveryList__item
|
||||
.noData.noData--fox.noData--clean
|
||||
%h2.noData__text No delivery attempts yet.
|
||||
- else
|
||||
- for delivery in message.deliveries.reverse
|
||||
%li.deliveryList__item
|
||||
.deliveryList__top
|
||||
.deliveryList__time
|
||||
= delivery.timestamp.to_s(:long)
|
||||
.deliveryList__status
|
||||
- if delivery.sent_with_ssl == 1
|
||||
= image_tag 'icons/lock.svg', :class => 'deliveryList__secure'
|
||||
%span.label.label--large{:class => "label--messageStatus-#{delivery.status.underscore}"}= delivery.status.underscore.humanize
|
||||
- if delivery.details
|
||||
%p.deliveryList__error= format_delivery_details(@server, delivery.details)
|
||||
- if delivery.log_id || delivery.output
|
||||
= link_to "Show technical details", '#', :class => 'js-toggle js-tech-link deliveryList__techLink', :data => {:element => '.js-tech-link, .js-tech-output'}
|
||||
.deliveryList__error.deliveryList__error--output.js-tech-output.is-hidden
|
||||
%p.deliveryList__error--output-text= delivery.output
|
||||
- if delivery.time
|
||||
%p.deliveryList__error--output-ref Time: #{delivery.time}s
|
||||
- if delivery.log_id
|
||||
%p.deliveryList__error--output-ref Support Ref: #{delivery.log_id}
|
||||
- if message.queued_message && !message.queued_message.locked?
|
||||
%p.deliveryList-removeLink= link_to "Remove from queue", remove_from_queue_organization_server_message_path(organization, @server, message.id), :method => :delete, :remote => true, :data => {:disable_with => "Removing...", :confirm => "Are you sure you wish to remove this message from the queue?"}, :class => "u-link"
|
||||
8
app/views/messages/_header.html.haml
Normal file
8
app/views/messages/_header.html.haml
Normal file
@@ -0,0 +1,8 @@
|
||||
.navBar.navBar--secondary
|
||||
%ul
|
||||
%li.navBar__item= link_to "Outgoing Messages", [:outgoing, organization, @server, :messages], :class => ['navBar__link', active_nav == :outgoing ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Incoming Messages", [:incoming, organization, @server, :messages], :class => ['navBar__link', active_nav == :incoming ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Queue", [:queue, organization, @server], :class => ['navBar__link', active_nav == :queue ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Held", [:held, organization, @server, :messages], :class => ['navBar__link', active_nav == :held ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Send Message", [:new, organization, @server, :message], :class => ['navBar__link', active_nav == :new ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Suppressions", [:suppressions, organization, @server, :messages], :class => ['navBar__link', active_nav == :suppressions ? 'is-active' : '']
|
||||
13
app/views/messages/_index.html.haml
Normal file
13
app/views/messages/_index.html.haml
Normal file
@@ -0,0 +1,13 @@
|
||||
.pageContent.js-ajax-region
|
||||
- if @searchable
|
||||
= render 'search'
|
||||
|
||||
- if @messages[:records].empty?
|
||||
.noData.noData--clean.noData--koala
|
||||
%h2.noData__title No koalified messages found matching your filter.
|
||||
%p.noData__text
|
||||
There were no messages which matched the query that you entered. Sorry about that.
|
||||
- else
|
||||
= render 'list', :messages => @messages[:records]
|
||||
= render 'shared/message_db_pagination', :data => @messages, :name => "message"
|
||||
|
||||
24
app/views/messages/_list.html.haml
Normal file
24
app/views/messages/_list.html.haml
Normal file
@@ -0,0 +1,24 @@
|
||||
%ul.messageList
|
||||
- for message in messages
|
||||
- if message.is_a?(QueuedMessage)
|
||||
- message = message.message
|
||||
%li.messageList__message
|
||||
= link_to organization_server_message_path(organization, @server, message.id), :class => 'messageList__link' do
|
||||
.messageList__details{:class => 'messageList__details--' + message.scope}
|
||||
%p.messageList__subject= message.subject || "No subject"
|
||||
%dl.messageList__addresses
|
||||
%dt To
|
||||
%dd
|
||||
- if message.rcpt_to_return_path?
|
||||
%span.returnPathTag Return Path
|
||||
- else
|
||||
= message.rcpt_to || "none"
|
||||
%dt From
|
||||
%dd= message.mail_from || "none"
|
||||
|
||||
.messageList__meta
|
||||
%p.messageList__timestamp= message.timestamp.in_time_zone.to_s(:long)
|
||||
%p.messageList__status
|
||||
- if message.read?
|
||||
%span.label.label--purple Opened
|
||||
%span.label{:class => "label--messageStatus-#{message.status.underscore}"}= message.status.underscore.humanize
|
||||
38
app/views/messages/_message_header.html.haml
Normal file
38
app/views/messages/_message_header.html.haml
Normal file
@@ -0,0 +1,38 @@
|
||||
.messageHeader
|
||||
.messageHeader__header{:class => "messageHeader__header--#{@message.scope}"}
|
||||
%p.messageHeader__status
|
||||
%span.label{:class => "label--messageStatus-#{@message.status.underscore}"}= @message.status.underscore.humanize
|
||||
%h2.messageHeader__subject
|
||||
= @message.subject || "No subject"
|
||||
|
||||
.messageHeader__basicProperties
|
||||
%dl
|
||||
%dt From
|
||||
%dd
|
||||
- if @message.mail_from
|
||||
= link_to @message.mail_from || "[blank]", send("#{@message.scope}_organization_server_messages_path", organization, @server, :query => "from: #{@message.mail_from}"), :class => 'u-link'
|
||||
- else
|
||||
None
|
||||
|
||||
%dl
|
||||
%dt To
|
||||
%dd
|
||||
- if @message.rcpt_to_return_path?
|
||||
%span.returnPathTag.returnPathTag--inMessageHeader= link_to "Return Path", send("#{@message.scope}_organization_server_messages_path", organization, @server, :query => "to: #{@message.rcpt_to}"), :class => 'u-link'
|
||||
- else
|
||||
= link_to @message.rcpt_to || "[blank]", send("#{@message.scope}_organization_server_messages_path", organization, @server, :query => "to: #{@message.rcpt_to}"), :class => 'u-link'
|
||||
%dl
|
||||
%dt Received
|
||||
%dd= @message.timestamp.in_time_zone.to_s(:long)
|
||||
|
||||
.navBar.navBar--tertiary
|
||||
%ul
|
||||
%li.navBar__item= link_to "Properties", organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :properties ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Activity", activity_organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :activity ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Headers", headers_organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :headers ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Spam Checks", spam_checks_organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :spam_checks ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Plain Text", plain_organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :plain ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "HTML", html_organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :html ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Attachments", attachments_organization_server_message_path(organization, @server, @message.id), :class => ['navBar__link', active_nav == :attachments ? 'is-active' : '']
|
||||
- if @message.raw_message?
|
||||
%li.navBar__item= link_to "Download", download_organization_server_message_path(organization, @server, @message.id), :data => {:turbolinks => 'false'}, :class =>'navBar__link'
|
||||
41
app/views/messages/_search.html.haml
Normal file
41
app/views/messages/_search.html.haml
Normal file
@@ -0,0 +1,41 @@
|
||||
= form_tag request.fullpath, :method => :get, :remote => true, :class => 'messageSearch', :enforce_utf8 => false do
|
||||
%p
|
||||
= link_to "Need help with filtering?", '#', :class => 'messageSearch__help js-toggle-helpbox'
|
||||
= text_field_tag 'query', @query, :class => 'messageSearch__input js-focus-on-f js-form-submit', :placeholder => "Filter messages...", :data => {:disable_with => 'Searching...'}
|
||||
|
||||
.messageSearch__helpBox.is-hidden.js-helpbox
|
||||
.messageSearch__left
|
||||
%h3.messageSearch__helpBoxTitle
|
||||
Filtering your messages
|
||||
%p.messageSearch__helpBoxText
|
||||
You can filter your messages on a number of attributes. At present, it is not possible to
|
||||
search the content of your messages. To filter though, you can insert any of the strings
|
||||
as shown opposite into the box above and press enter.
|
||||
.messageSearch__right
|
||||
%dl.messageSearch__definition
|
||||
%dt to: rachel@example.com
|
||||
%dd Returns all mail addressed to the address provided.
|
||||
%dl.messageSearch__definition
|
||||
%dt from: tom@example.com
|
||||
%dd Returns all mail sent from to the address provided.
|
||||
%dl.messageSearch__definition
|
||||
%dt status: pending
|
||||
%dd Returns all messages with the status provided. The suitable statuses are: <code>pending</code>, <code>sent</code>, <code>held</code>, <code>softfail</code>, <code>hardfail</code> and <code>bounced</code>.
|
||||
%dl.messageSearch__definition
|
||||
%dt before: yyyy-mm-dd hh:mm
|
||||
%dd Returns any message received before the given timestamp.
|
||||
%dl.messageSearch__definition
|
||||
%dt after: yyyy-mm-dd hh:mm
|
||||
%dd Returns any message received after the given timestamp.
|
||||
%dl.messageSearch__definition
|
||||
%dt msgid: 57f3a85b35545@server01.mail
|
||||
%dd Returns any message with the given Message-ID header.
|
||||
%dl.messageSearch__definition
|
||||
%dt tag: password-reset
|
||||
%dd Returns any message tagged with the tag provided.
|
||||
%dl.messageSearch__definition
|
||||
%dt spam: yes
|
||||
%dd By default, spam is not shown in results. To show spam instead of non-spam, just add this to the query.
|
||||
%dl.messageSearch__definition
|
||||
%dt order: oldest-first
|
||||
%dd By default, newest messages are shown first. To show oldest messages first, you can add this.
|
||||
45
app/views/messages/activity.html.haml
Normal file
45
app/views/messages/activity.html.haml
Normal file
@@ -0,0 +1,45 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
- page_title << "Activity"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :activity
|
||||
.pageContent.pageContent--compact
|
||||
%ul.messageActivity
|
||||
- for entry in @entries.reverse
|
||||
- if entry.is_a?(Postal::MessageDB::Delivery)
|
||||
%li.messageActivity__event
|
||||
%p.messageActivity__timestamp= entry.timestamp.to_s(:long)
|
||||
.messageActivity__details.messageActivity--detailsDelivery
|
||||
%p.messageActivity__subject
|
||||
=# entry.status.underscore.humanize
|
||||
%span.label.label--large{:class => "label--messageStatus-#{entry.status.underscore}"}= entry.status.underscore.humanize
|
||||
|
||||
%p.messageActivity__extra= entry.details
|
||||
|
||||
- elsif entry.is_a?(Postal::MessageDB::Click)
|
||||
%li.messageActivity__event
|
||||
%p.messageActivity__timestamp= entry.timestamp.to_s(:long)
|
||||
.messageActivity__details.messageActivity--detailsClick
|
||||
%p.messageActivity__subject Click for #{entry.url}
|
||||
%p.messageActivity__extra Clicked from #{entry.ip_address} (#{entry.user_agent})
|
||||
|
||||
- elsif entry.is_a?(Postal::MessageDB::Load)
|
||||
%li.messageActivity__event
|
||||
%p.messageActivity__timestamp= entry.timestamp.to_s(:long)
|
||||
.messageActivity__details.messageActivity--detailsLoad
|
||||
%p.messageActivity__subject Message Viewed
|
||||
%p.messageActivity__extra Opened from #{entry.ip_address} (#{entry.user_agent})
|
||||
|
||||
%li.messageActivity__event
|
||||
%p.messageActivity__timestamp= @message.timestamp.to_s(:long)
|
||||
.messageActivity__details
|
||||
%p.messageActivity__subject
|
||||
Message received by Postal
|
||||
%p.messageActivity__extra
|
||||
- if @message.credential
|
||||
Received using the #{@message.credential.name} #{@message.credential.type} credential.
|
||||
- if @message.received_with_ssl == 1
|
||||
Connection secured with SSL.
|
||||
23
app/views/messages/attachments.html.haml
Normal file
23
app/views/messages/attachments.html.haml
Normal file
@@ -0,0 +1,23 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
- page_title << "Attachments"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :attachments
|
||||
.pageContent.pageContent--compact
|
||||
- if @message.attachments.empty?
|
||||
.noData.noData--clean.noData--wolf
|
||||
%h2.noData__title There are no attachments for this message.
|
||||
%p.noData__text
|
||||
This means that we no longer store the raw data for this e-mail
|
||||
or the e-mail just didn't have any attached files.
|
||||
- else
|
||||
%ul.largeList
|
||||
- @message.attachments.each_with_index do |attachment, i|
|
||||
%li.largeList__item
|
||||
= link_to attachment_organization_server_message_path(organization, @server, @message.id, :attachment => i), :class => 'largeList__link', :data => {:turbolinks => "false"} do
|
||||
%p.largeList__rightLabel= number_to_human_size attachment.body.to_s.bytesize
|
||||
%p= attachment.filename
|
||||
%p.largeList__subText= attachment.mime_type
|
||||
25
app/views/messages/headers.html.haml
Normal file
25
app/views/messages/headers.html.haml
Normal file
@@ -0,0 +1,25 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
- page_title << "Headers"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :headers
|
||||
|
||||
- if @message.headers.empty?
|
||||
.pageContent.pageContent--compact
|
||||
.noData.noData--clean.noData--cat2
|
||||
%h2.noData__title There are no headers for this message.
|
||||
%p.noData__text
|
||||
This means that we no longer store the raw data for this e-mail.
|
||||
|
||||
- else
|
||||
.pageContent
|
||||
.headersList
|
||||
- for key, values in @message.headers
|
||||
- for value in values
|
||||
%dl.headersList__item
|
||||
%dt= key
|
||||
%dd= value
|
||||
|
||||
16
app/views/messages/held.html.haml
Normal file
16
app/views/messages/held.html.haml
Normal file
@@ -0,0 +1,16 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Held"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => :held
|
||||
- if @messages.empty? && !@queried
|
||||
.pageContent--compact
|
||||
.noData.noData--deer.noData--clean
|
||||
%h2.noData__title You haven't got any held messages.
|
||||
%p.noData__text
|
||||
You haven't sent any messages through this mail server yet. Not to worry though
|
||||
they'll start appearing here as soon as you start sending them.
|
||||
- else
|
||||
= render 'index'
|
||||
|
||||
17
app/views/messages/html.html.haml
Normal file
17
app/views/messages/html.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
- page_title << "HTML"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :html
|
||||
- if @message.html_body.blank?
|
||||
.pageContent.pageContent--compact
|
||||
.noData.noData--clean.noData--panda
|
||||
%h2.noData__title There's no HTML body for this message.
|
||||
%p.noData__text
|
||||
This means that we no longer store the raw data for this e-mail
|
||||
or the e-mail didn't include a HTML part.
|
||||
- else
|
||||
%iframe{:width => "100%", :height => "100%", :src => html_raw_organization_server_message_path(organization, @server, @message.id)}
|
||||
18
app/views/messages/incoming.html.haml
Normal file
18
app/views/messages/incoming.html.haml
Normal file
@@ -0,0 +1,18 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Incoming"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => :incoming
|
||||
- if @messages[:records].empty? && !@queried
|
||||
.pageContent--compact
|
||||
.noData.noData--deer.noData--clean
|
||||
%h2.noData__title Oh deer! You haven't received any messages yet.
|
||||
%p.noData__text
|
||||
You haven't received any messages through this mail server yet. Not to worry though
|
||||
they'll start appearing here as soon as you start receiving them.
|
||||
%p.noData__button
|
||||
= link_to "View spam messages", incoming_organization_server_messages_path(organization, @server, :query => "spam: yes"), :class => "button button--neutral"
|
||||
|
||||
- else
|
||||
= render 'index'
|
||||
49
app/views/messages/new.html.haml
Normal file
49
app/views/messages/new.html.haml
Normal file
@@ -0,0 +1,49 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Send"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => :new
|
||||
.pageContent.pageContent--compact
|
||||
%p.pageContent__intro.u-margin
|
||||
You can use this form to send a message through this mail server. This is useful
|
||||
for testing and debugging purposes.
|
||||
- if @message.is_a?(OutgoingMessagePrototype)
|
||||
%p.pageContent__text.u-margin.newMessageType.newMessageType--outgoing
|
||||
<b>You are sending an outgoing message.</b> This e-mail will be routed as if it was an e-mail sent from your mail server.
|
||||
= link_to "Simulate an incoming e-mail instead?", {:direction => 'incoming'}, :class => 'u-link'
|
||||
- else
|
||||
%p.pageContent__text.u-margin.newMessageType.newMessageType--incoming
|
||||
<b>You are sending an incoming message.</b> This e-mail will can only be sent to your routes and will behave as if it was received by your mail server.
|
||||
= link_to "Simulate an outgoing e-mail instead?", {:direction => 'outgoing'}, :class => 'u-link'
|
||||
= form_tag [organization, @server, :messages], :remote => true do
|
||||
= hidden_field_tag 'direction', params[:direction]
|
||||
.fieldSet
|
||||
- if @message.is_a?(OutgoingMessagePrototype)
|
||||
.fieldSet__field
|
||||
= label_tag :message_from, "From ", :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= text_field_tag "message[from]", @message.from, :autofocus => true, :class => 'input input--text'
|
||||
%p.fieldSet__text
|
||||
Enter the address that you wish to wish to send the message from. This must be
|
||||
an address which exists at one of your verified domains.
|
||||
.fieldSet__field
|
||||
= label_tag :message_to, "To", :class => 'fieldSet__label'
|
||||
.fieldSet__input= text_field_tag "message[to]", @message.to, :class => 'input input--text'
|
||||
- else
|
||||
.fieldSet__field
|
||||
= label_tag :message_route_id, "Route", :class => 'fieldSet__label'
|
||||
.fieldSet__input= text_field_tag "message[to]", @message.to, :class => 'input input--text'
|
||||
|
||||
.fieldSet__field
|
||||
= label_tag :message_from, "From", :class => 'fieldSet__label'
|
||||
.fieldSet__input= text_field_tag "message[from]", @message.from, :class => 'input input--text'
|
||||
.fieldSet__field
|
||||
= label_tag :message_subject, "Subject", :class => 'fieldSet__label'
|
||||
.fieldSet__input= text_field_tag "message[subject]", @message.subject, :class => 'input input--text'
|
||||
.fieldSet__field
|
||||
= label_tag :message_plain_body, "Body", :class => 'fieldSet__label'
|
||||
.fieldSet__input= text_area_tag "message[plain_body]", @message.plain_body, :class => 'input input--area'
|
||||
.fieldSetSubmit.buttonSet
|
||||
= submit_tag "Send Message", :class => 'button button--positive js-form-submit'
|
||||
|
||||
16
app/views/messages/outgoing.html.haml
Normal file
16
app/views/messages/outgoing.html.haml
Normal file
@@ -0,0 +1,16 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Outgoing"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => :outgoing
|
||||
- if @messages[:records].empty? && !@queried
|
||||
.pageContent--compact
|
||||
.noData.noData--deer.noData--clean
|
||||
%h2.noData__title Oh deer! You haven't sent any messages yet.
|
||||
%p.noData__text
|
||||
You haven't sent any messages through this mail server yet. Not to worry though
|
||||
they'll start appearing here as soon as you start sending them.
|
||||
- else
|
||||
= render 'index'
|
||||
|
||||
17
app/views/messages/plain.html.haml
Normal file
17
app/views/messages/plain.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
- page_title << "Plain Text"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :plain
|
||||
.pageContent.pageContent--compact
|
||||
- if @message.plain_body.blank?
|
||||
.noData.noData--clean.noData--owl
|
||||
%h2.noData__title There's no plain text body for this message.
|
||||
%p.noData__text
|
||||
This means that we no longer store the raw data for this e-mail
|
||||
or the e-mail didn't include a plain text part.
|
||||
- else
|
||||
%pre.codeBlock= @message.plain_body
|
||||
76
app/views/messages/show.html.haml
Normal file
76
app/views/messages/show.html.haml
Normal file
@@ -0,0 +1,76 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :properties
|
||||
.pageContent
|
||||
.messagePropertiesPage
|
||||
.messagePropertiesPage__left
|
||||
.messagePropertiesPage__propertyPair
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Spam Status
|
||||
%dd
|
||||
= link_to spam_checks_organization_server_message_path(organization, @server, @message.id) do
|
||||
%span.label.label--large{:class => "label--spamStatus-#{@message.spam_status.underscore}"}= @message.spam_status.underscore.humanize
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Tag
|
||||
%dd= @message.tag ? link_to(@message.tag, send("#{@message.scope}_organization_server_messages_path", organization, @server, :query => "tag: #{@message.tag}"), :class => "u-link") : "Not tagged"
|
||||
.messagePropertiesPage__propertyPair
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Raw Message
|
||||
%dd= @message.raw_message? ? "Available" : "Removed"
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Message Size
|
||||
%dd= @message.size ? number_to_human_size(@message.size) : "n/a"
|
||||
|
||||
.messagePropertiesPage__propertyPair
|
||||
- if @message.scope == 'incoming'
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Route
|
||||
%dd
|
||||
- if @message.route
|
||||
= link_to @message.route.name, [:edit, organization, @server, @message.route], :class => "u-link"
|
||||
- else
|
||||
Unknown Route
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Domain
|
||||
%dd
|
||||
- if @message.domain
|
||||
= link_to @message.domain.name, [organization, @server, :domains], :class => "u-link"
|
||||
- else
|
||||
Unknown Domain
|
||||
- else
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Credential
|
||||
%dd
|
||||
- if @message.credential
|
||||
= link_to @message.credential.name, [:edit, organization, @server, @message.credential], :class => "u-link"
|
||||
- else
|
||||
Unknown Credential
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Domain
|
||||
%dd
|
||||
- if @message.domain
|
||||
= link_to @message.domain.name, [organization, @server, :domains], :class => "u-link"
|
||||
- else
|
||||
Unknown Domain
|
||||
- if @message.threat == 1
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Threat
|
||||
%dd= @message.threat_details
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Message ID
|
||||
%dd= @message.message_id || "No message ID"
|
||||
- unless @message.received_with_ssl.nil?
|
||||
%dl.messagePropertiesPage__property
|
||||
%dt Transport Security
|
||||
- if @message.received_with_ssl == 1
|
||||
%dd.messagePropertiesPage__property--locked Received over a SSL connection
|
||||
- else
|
||||
%dd Not received with SSL
|
||||
|
||||
.messagePropertiesPage__right
|
||||
= render 'deliveries', :message => @message
|
||||
|
||||
31
app/views/messages/spam_checks.html.haml
Normal file
31
app/views/messages/spam_checks.html.haml
Normal file
@@ -0,0 +1,31 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Message ##{@message.id}"
|
||||
- page_title << "Spam checks"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => @message.scope.to_sym
|
||||
= render 'message_header', :active_nav => :spam_checks
|
||||
.pageContent.pageContent--compact
|
||||
|
||||
- if @spam_checks.empty?
|
||||
.noData.noData--clean
|
||||
%h2.noData__title This message doesn't have any spam checks.
|
||||
%p.noData__text
|
||||
This likely means we haven't scanned this message to determine its likelyhood
|
||||
of being spam. It may take a few seconds to appear after a new message is
|
||||
received.
|
||||
|
||||
- else
|
||||
%ul.spamCheckList
|
||||
%li.spamCheckList__item.spamCheckList__item--total
|
||||
%p.spamCheckList__score{:class => @message.spam_score <= 0 ? (@message.spam_score == 0 ? 'spamCheckList__score--neutral' : 'spamCheckList__score--positive') : 'spamCheckList__score--negative'}= @message.spam_score
|
||||
.spamCheckList__details.spamCheckList__details--total
|
||||
Total spam score for e-mail
|
||||
- for spam_check in @spam_checks
|
||||
%li.spamCheckList__item
|
||||
%p.spamCheckList__score{:class => spam_check['score'] <= 0 ? (spam_check['score'] == 0 ? 'spamCheckList__score--neutral' : 'spamCheckList__score--positive') : 'spamCheckList__score--negative'}= spam_check['score']
|
||||
.spamCheckList__details
|
||||
%p.spamCheckList__code= spam_check['code']
|
||||
%p.spamCheckList__description= spam_check['description']
|
||||
|
||||
26
app/views/messages/suppressions.html.haml
Normal file
26
app/views/messages/suppressions.html.haml
Normal file
@@ -0,0 +1,26 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Messages"
|
||||
- page_title << "Suppression List"
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :messages
|
||||
= render 'header', :active_nav => :suppressions
|
||||
.pageContent.pageContent--compact
|
||||
- if @suppressions[:records].empty?
|
||||
.noData.noData--clean.noData--owl
|
||||
%h2.noData__title No addresses on the suppression list.
|
||||
%p.noData__text
|
||||
When messages cannot be delivered, addresses are added to the suppression list which stops
|
||||
future messages to the same recipient being sent through.
|
||||
- else
|
||||
%p.pageContent__intro.u-margin
|
||||
When messages cannot be delivered, addresses are added to the suppression list which stops
|
||||
future messages to the same recipient being sent through. Recipients are removed from the list after 30 days.
|
||||
%ul.suppressionList
|
||||
- for suppression in @suppressions[:records]
|
||||
%li.suppressionList__item
|
||||
.suppressionList__left
|
||||
%p.suppressionList__address= link_to suppression['address'], outgoing_organization_server_messages_path(organization, @server, :query => "to: #{suppression['address']}")
|
||||
%p.suppressionList__reason= suppression['reason'].capitalize
|
||||
.suppressionList__right
|
||||
%p.suppressionList__timestamp Added #{Time.at(suppression['timestamp']).to_s(:long)}
|
||||
= render 'shared/message_db_pagination', :data => @suppressions, :name => "suppression"
|
||||
المرجع في مشكلة جديدة
حظر مستخدم