Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • anatoli/postal
1 result
Show changes
Commits on Source (5)
Loading
Loading
@@ -108,17 +108,19 @@
end
 
def retry
if @message.queued_message
@message.queued_message.queue!
flash[:notice] = "This message will be retried shortly."
elsif @message.held?
@message.add_to_message_queue(:manual => true)
flash[:notice] = "This message has been released. Delivery will be attempted shortly."
elsif @server.mode == 'Development'
@message.add_to_message_queue(:manual => true)
flash[:notice] = "This message will be redelivered shortly."
if @message.raw_message?
if @message.queued_message
@message.queued_message.queue!
flash[:notice] = "This message will be retried shortly."
elsif @message.held?
@message.add_to_message_queue(:manual => true)
flash[:notice] = "This message has been released. Delivery will be attempted shortly."
else
@message.add_to_message_queue(:manual => true)
flash[:notice] = "This message will be redelivered shortly."
end
else
flash[:alert] = "This message is no longer queued for sending."
flash[:alert] = "This message is no longer available."
end
redirect_to_with_json organization_server_message_path(organization, @server, @message.id)
end
Loading
Loading
Loading
Loading
@@ -19,6 +19,10 @@
%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
- else
%li.deliveryList__item.deliveryList__item--header
%p 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
Loading
Loading
Loading
Loading
@@ -68,9 +68,12 @@ smtp_server:
tls_enabled: false
tls_certificate_path: # Defaults to config/smtp.cert
tls_private_key_path: # Defaults to config/smtp.key
tls_ciphers:
ssl_version: SSLv23
proxy_protocol: false
log_connect: true
strip_received_headers: false
max_message_size: 14 # size in Megabytes
 
smtp_relays:
-
Loading
Loading
Loading
Loading
@@ -82,7 +82,7 @@ module Postal
begin
@database.query(create_table_query(table,:columns => {
:id => 'int(11) NOT NULL AUTO_INCREMENT',
:data => 'mediumblob DEFAULT NULL',
:data => 'longblob DEFAULT NULL',
:next => 'int(11) DEFAULT NULL'
}
))
Loading
Loading
Loading
Loading
@@ -46,7 +46,7 @@ module Postal
end
next
end
smtp_client = Net::SMTP.new(@remote_ip, port)
smtp_client = Net::SMTP.new(hostname, port)
if @source_ip_address
# Set the source IP as appropriate
smtp_client.source_address = ip_type == :aaaa ? @source_ip_address.ipv6 : @source_ip_address.ipv4
Loading
Loading
@@ -236,6 +236,8 @@ module Postal
@ssl_context_with_verify ||= begin
c = OpenSSL::SSL::SSLContext.new
c.verify_mode = OpenSSL::SSL::VERIFY_PEER
c.cert_store = OpenSSL::X509::Store.new
c.cert_store.set_default_paths
c
end
end
Loading
Loading
Loading
Loading
@@ -377,8 +377,8 @@ module Postal
end
 
def finished
if @data.bytesize > 14.megabytes.to_i
return "552 Message too large (maximum size 14MB)"
if @data.bytesize > Postal.config.smtp_server.max_message_size.megabytes.to_i
return "552 Message too large (maximum size %dMB)" % Postal.config.smtp_server.max_message_size
end
 
if @headers['received'].select { |r| r =~ /by #{Postal.config.dns.smtp_server_hostname}/ }.count > 4
Loading
Loading
Loading
Loading
@@ -39,7 +39,8 @@ module Postal
ssl_context.cert = Postal.smtp_certificates[0]
ssl_context.extra_chain_cert = Postal.smtp_certificates[1..-1]
ssl_context.key = Postal.smtp_private_key
ssl_context.ssl_version = "SSLv23"
ssl_context.ssl_version = Postal.config.smtp_server.ssl_version if Postal.config.smtp_server.ssl_version
ssl_context.ciphers = Postal.config.smtp_server.tls_ciphers if Postal.config.smtp_server.tls_ciphers
ssl_context
end
end
Loading
Loading
@@ -142,7 +143,7 @@ module Postal
else
buffers[io] << io.readpartial(10240)
end
rescue EOFError, Errno::ECONNRESET
rescue EOFError, Errno::ECONNRESET, Errno::ETIMEDOUT
# Client went away
eof = true
end
Loading
Loading