Skip to content

Commit

Permalink
Make resent-sender header optional (#2384)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostkalwij authored Mar 22, 2023
1 parent 1e3622c commit c6fb8d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/postal.defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ general:
use_local_ns_for_domains: false
default_spam_threshold: 5.0
default_spam_failure_threshold: 20.0
use_resent_sender_header: true

web_server:
bind_address: 127.0.0.1
Expand Down
6 changes: 5 additions & 1 deletion lib/postal/smtp_sender.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ def send_message(message, force_rcpt_to = nil)
else
mail_from = "#{message.server.token}@#{Postal.config.dns.return_path}"
end
raw_message = "Resent-Sender: #{mail_from}\r\n" + message.raw_message
if Postal.config.general.use_resent_sender_header
raw_message = "Resent-Sender: #{mail_from}\r\n" + message.raw_message
else
raw_message = message.raw_message
end
tries = 0
begin
if @smtp_client.nil?
Expand Down

0 comments on commit c6fb8d2

Please sign in to comment.