Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Set local domain for swiftmailer #27306

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented May 31, 2021

Fix #14941
Fix #25716

SwiftMailer uses the local domain for the ehlo command.

By default the server_name (mostly for web requests) or 127.0.0.1 is used: https://github.com/nextcloud/3rdparty/blob/cdbf02e814d84b2186b9b1de7a36789d61e7e06a/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php#L4-L8

This patch uses parse_url to parse overwrite.cli.url and use the host value for the ehlo command. In addition we could use https://www.php.net/manual/en/function.gethostname as fallback if overwriteCliUrl is empty. That might be better than 127.0.0.1 or the server_name.

@kesselb kesselb added enhancement 3. to review Waiting for reviews labels May 31, 2021
@kesselb kesselb added this to the Nextcloud 22 milestone May 31, 2021
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the enh/noid/set-local-domain-for-swiftmailer branch from 613d9b6 to 747325f Compare May 31, 2021 13:04
@blizzz blizzz mentioned this pull request Jun 2, 2021
57 tasks
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

👍

@ChristophWurst ChristophWurst merged commit 745543d into master Jun 8, 2021
@ChristophWurst ChristophWurst deleted the enh/noid/set-local-domain-for-swiftmailer branch June 8, 2021 13:43
@ChristophWurst
Copy link
Member

backport?

@kesselb
Copy link
Contributor Author

kesselb commented Jun 8, 2021

22 is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google Smtp-Relay Error (EHLO) SMTP Authentication fails with "501 Syntactically invalid HELO argument(s)"
3 participants