Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixing list_of_mail_to list generation #680

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

makirill
Copy link
Contributor

@makirill makirill commented Feb 7, 2023

What does this PR do?

The list_of_mail_to list (which is used for the SMTP TO: field) is generated as follow, so SMTP servers which are strictly follows RFC returning errors.

"to": "[] + [ 'name@domain.com' ]",

This PR updating list_of_mail_to generation, so the final result looks like:

"to": [
     "name@domain.com",
     "first.last@domain.com"
  ]

How should this be tested?

This PR was tested by sending emails using the email-notify-list-of-users.yml playbook.

People to notify

cc: @redhat-cop/infra-ansible

The list_of_mail_to list (which is used for TO: filed for SMTP) is
generated as:
 "to": "[] + [ 'name@domain.com' ]",

, which causes problems with SMTP servers that are strictly follows RFC.

This commit updating list_of_mail_to generation, so the final result should
look like:
 "to": [
     "name@domain.com",
     "first.last@domain.com"
  ],
Copy link
Contributor

@oybed oybed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding the problem and submitting the PR.

I'd like to keep the change as simple as possible. See inline for suggested one-line change to fix the problem.

oybed
oybed previously approved these changes Feb 9, 2023
Copy link
Contributor

@oybed oybed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@oybed oybed merged commit 006140c into redhat-cop:main Feb 9, 2023
@makirill makirill deleted the fix/email-notify-list-of-users branch February 9, 2023 12:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants