Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Mailer] Fix SMTP Authentication when using STARTTLS#34760

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

DjLeChuck
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#34522
LicenseMIT

When the mail server uses STARTTLS, the SMTP Authentication is not performed because the AUTH capabilities are not send during the first EHLO call, but during the second one.

Example of problematic exchange solved by this PR:

      < 220 mydomain.tld ESMTP Postcow      > EHLO [127.0.0.1]      < 250-mydomain.tld      < 250-PIPELINING      < 250-SIZE 104857600      < 250-ETRN      < 250-STARTTLS      < 250-ENHANCEDSTATUSCODES      < 250-8BITMIME      < 250-DSN      < 250 CHUNKING      > STARTTLS      < 220 2.0.0 Ready to start TLS      > EHLO [127.0.0.1]      < 250-mydomain.tld      < 250-PIPELINING      < 250-SIZE 104857600      < 250-ETRN      < 250-AUTH PLAIN LOGIN      < 250-AUTH=PLAIN LOGIN      < 250-ENHANCEDSTATUSCODES      < 250-8BITMIME      < 250-DSN      < 250 CHUNKING      > MAIL FROM:<noreply@XXX>      < 250 2.1.0 Ok      > RCPT TO:<XXX>      < 554 5.7.1 <XXX>: Client host rejected: Access denied

afhanxd reacted with thumbs up emojiafhanxd reacted with heart emoji
@stof
Copy link
Member

stof commentedDec 2, 2019

Is it possible to write a test covering this, to prevent regressions ?

@DjLeChuck
Copy link
ContributorAuthor

Yes off course@stof !

Can I use some fixed EHLO exchanges like the one above or should I connect to a real server?

@fabpot
Copy link
Member

@DjLeChuck We tend to avoid connecting to real servers to have fast and stable tests. So, replaying a real scenario is best.

@DjLeChuck
Copy link
ContributorAuthor

I'm stuck, I don't know how to test without having to connect to a real server.

I don't know well PHPUnit and I lose myself in the mocking system. If someone wants to take the problem or help me, you're welcome!

@fabpot
Copy link
Member

Thank you@DjLeChuck.

DjLeChuck and lucascdsilva reacted with thumbs up emojiDjLeChuck reacted with heart emoji

fabpot added a commit that referenced this pull requestDec 7, 2019
…Chuck)This PR was merged into the 4.4 branch.Discussion----------[Mailer] Fix SMTP Authentication when using STARTTLS| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fix#34522| License       | MITWhen the mail server uses STARTTLS, the SMTP Authentication is not performed because the AUTH capabilities are not send during the first EHLO call, but during the second one.Example of problematic exchange solved by this PR:```      < 220 mydomain.tld ESMTP Postcow      > EHLO [127.0.0.1]      < 250-mydomain.tld      < 250-PIPELINING      < 250-SIZE 104857600      < 250-ETRN      < 250-STARTTLS      < 250-ENHANCEDSTATUSCODES      < 250-8BITMIME      < 250-DSN      < 250 CHUNKING      > STARTTLS      < 220 2.0.0 Ready to start TLS      > EHLO [127.0.0.1]      < 250-mydomain.tld      < 250-PIPELINING      < 250-SIZE 104857600      < 250-ETRN      < 250-AUTH PLAIN LOGIN      < 250-AUTH=PLAIN LOGIN      < 250-ENHANCEDSTATUSCODES      < 250-8BITMIME      < 250-DSN      < 250 CHUNKING      > MAIL FROM:<noreply@XXX>      < 250 2.1.0 Ok      > RCPT TO:<XXX>      < 554 5.7.1 <XXX>: Client host rejected: Access denied```Commits-------75b5454 [Mailer] Fix SMTP Authentication when using STARTTLS
@fabpotfabpot merged commit75b5454 intosymfony:4.4Dec 7, 2019
@DjLeChuckDjLeChuck deleted the fix-symfony-mailer-starttls-auth branchDecember 7, 2019 14:11
This was referencedDec 19, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
4.4
Development

Successfully merging this pull request may close these issues.

5 participants
@DjLeChuck@stof@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp