diff --git a/app/models/incoming_message_prototype.rb b/app/models/incoming_message_prototype.rb index f8fcd81..c006081 100644 --- a/app/models/incoming_message_prototype.rb +++ b/app/models/incoming_message_prototype.rb @@ -95,7 +95,7 @@ class IncomingMessagePrototype :content => attachment[:data] } end - mail.header['Received'] = "from #{@source_type} (#{@ip} [#{@ip}]) by Postal with HTTP; #{Time.now.rfc2822.to_s}" + mail.header['Received'] = "from #{@source_type} (#{@ip} [#{@ip}]) by Postal with HTTP; #{Time.now.utc.rfc2822.to_s}" mail.to_s end end diff --git a/lib/postal/smtp_server/client.rb b/lib/postal/smtp_server/client.rb index a11f360..04a7928 100644 --- a/lib/postal/smtp_server/client.rb +++ b/lib/postal/smtp_server/client.rb @@ -326,7 +326,7 @@ module Postal @headers = {} @receiving_headers = true - received_header_content = "from #{@helo_name} (#{@hostname} [#{@ip_address}]) by #{Postal.config.dns.smtp_server_hostname} with SMTP; #{Time.now.rfc2822.to_s}".force_encoding('BINARY') + received_header_content = "from #{@helo_name} (#{@hostname} [#{@ip_address}]) by #{Postal.config.dns.smtp_server_hostname} with SMTP; #{Time.now.utc.rfc2822.to_s}".force_encoding('BINARY') if !Postal.config.smtp_server.strip_received_headers? @data << "Received: #{received_header_content}\r\n" end