Update postfix.sh, so mysql_sender_dependent_default_transport_maps.cf is in line with mysql_sasl_passwd_maps_sender_dependent.cf #6085
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR include?
Short Description
In case when the domain has relay host configures (rh.example.com) and you configure a separate relay host for user within that domain (rh2.example.com) credentials for relay host are selected from domain relay host (rh.example.com) no users, like:
[at]example.com - relay host rh.example.com
example[at]example.com - relay host rh2.example.com
Expected result:
When sending email from any email under domain use rh.example.com, when sending from example[at]example.com use rh2.example.com, both hosts require authentication, correct authentication is provided and email sent.
Actual result:
When sending email from any email under domain use rh.example.com, when sending from example[at]example.com use rh2.example.com, authentication credentials for rh2.example.com are selected from rh.example.com.
Cause:
mysql_sender_dependent_default_transport_maps.cf
SELECT COALESCE
starts byrelayhosts LEFT OUTER JOIN mailbox
and then usesrelayhosts LEFT OUTER JOIN domain
, but mysql_sasl_passwd_maps_sender_dependent.cf currently does opposite, so I flipped the order so that both queries have same logic.Affected Containers
Did you run tests?
Yes
What did you tested?
I tested postfix, sending, receiving mail using relays and not, relays in different configurations. Since I have used this fix in production for about two weeks now.
What were the final results? (Awaited, got)
The connection was always made and authenticated correctly.