fixes bug with receiving messages to the return path

treats all messages sent to the return path and any domain with the return path prefix the same
This commit is contained in:
Adam Cooke committed 2017-05-16 14:49:56 +01:00
1 parent 9a76538f11
commit 4106ac6c7e
1 file changed
+1 -1
+1 -1
View File
@@ -256,7 +256,7 @@ module Postal
uname, domain = rcpt_to.split('@', 2) uname, domain = rcpt_to.split('@', 2)
uname, tag = uname.split('+', 2) uname, tag = uname.split('+', 2)
if domain =~ /\A#{Regexp.escape(Postal.config.dns.custom_return_path_prefix)}\./ if domain == Postal.config.dns.return_path || domain =~ /\A#{Regexp.escape(Postal.config.dns.custom_return_path_prefix)}\./
# This is a return path # This is a return path
@state = :rcpt_to_received @state = :rcpt_to_received
if server = ::Server.where(:token => uname).first if server = ::Server.where(:token => uname).first