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

Establish STARTTLS connection without authentication #17

Merged
merged 4 commits into from
Jul 14, 2022
Merged

Establish STARTTLS connection without authentication #17

merged 4 commits into from
Jul 14, 2022

Conversation

schengawegga
Copy link
Collaborator

For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.

For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.
@schengawegga
Copy link
Collaborator Author

Is there anyone who can do a code-review and merge this request?

Copy link
Member

@till till left a comment

Choose a reason for hiding this comment

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

Change looks sane to me. Maybe @alecpl has thoughts?

Copy link
Contributor

@alecpl alecpl left a comment

Choose a reason for hiding this comment

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

Please describe the new option in the constructor doc. It need to be noted somewhere that the option requires Net_SMTP 1.10.0.

Mail/smtp.php Outdated
@@ -402,6 +415,16 @@ public function getSMTPObject()
return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_AUTH);
}
}

/* Attempt to establishe a TLS encrypted connection. */
Copy link
Contributor

Choose a reason for hiding this comment

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

"establishe" -> "establish".

Mail/smtp.php Outdated
@@ -402,6 +415,16 @@ public function getSMTPObject()
return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_AUTH);
}
}

/* Attempt to establishe a TLS encrypted connection. */
if ($this->starttls && $this->auth === False) {
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be better to do just !$this->auth here.

Mail/smtp.php Outdated
/* Attempt to establishe a TLS encrypted connection. */
if ($this->starttls && $this->auth === False) {
$starttls = $this->_smtp->starttls();
if(PEAR::isError($starttls)){
Copy link
Contributor

Choose a reason for hiding this comment

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

A space after if, and elseif below. And after closing bracket.

Mail/smtp.php Outdated
$starttls = $this->_smtp->starttls();
if(PEAR::isError($starttls)){
return PEAR::raiseError($starttls);
} elseif($starttls === False){
Copy link
Contributor

Choose a reason for hiding this comment

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

false and spacing.

For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.

Change request from alecpl
@schengawegga schengawegga requested a review from alecpl December 22, 2021 13:13
@alecpl
Copy link
Contributor

alecpl commented Dec 22, 2021

It looks good now. I see one point of possible confusion. If you set auth=PLAIN and starttls=false, STARTTLS will still be used, as this is the default behavior for of the auth() method. However, I don't know how to solve that without a BC break.

@schengawegga
Copy link
Collaborator Author

You´re right. Thank you. I´ve not seen this. I will do a new commit in a few hours, so we will be compatible.

For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.

Another change request from alecpl
@schengawegga
Copy link
Collaborator Author

It looks good now. I see one point of possible confusion. If you set auth=PLAIN and starttls=false, STARTTLS will still be used, as this is the default behavior for of the auth() method. However, I don't know how to solve that without a BC break.

Now it should be compatible with the Net_SMTP workflow.

Mail/smtp.php Outdated
@@ -185,7 +204,8 @@ class Mail_smtp extends Mail {
* passed in. It looks for the following parameters:
* host The server to connect to. Defaults to localhost.
* port The port to connect to. Defaults to 25.
* auth SMTP authentication. Defaults to none.
* auth SMTP authentication. Defaults to none.
* starttls Should STARTTLS connection be used? Defaults to false. PEAR/Net_SMTP >= 1.10.0 required.
Copy link
Contributor

Choose a reason for hiding this comment

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

The default is not false anymore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hawkeye ;-) I´m sorry. I have pushed another commit with "No default".

For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.

Another change request from alecpl
@schengawegga
Copy link
Collaborator Author

Hi, what are the next steps?

@schengawegga
Copy link
Collaborator Author

Hi there. Do I need to do anything else to complete the merge?

@MegaphoneJon
Copy link

Is there anything that someone can do to help the maintainers to complete this merge? It appears to be approved, but I'm willing to put it into production if that would help.

@alecpl
Copy link
Contributor

alecpl commented Jul 14, 2022

Merged. However, I'm not interested in this project anymore.

@schengawegga
Copy link
Collaborator Author

So, if alecpl is not interested anymore, is there anyone who is interested? to do merges at this project in the future?
i´m interested, so if nobody else is interested, give me the permission to do merges on this project, please.

@MegaphoneJon
Copy link

@alecpl Thank you for all your work as a maintainer over the years!

@gauthierm I see that you're the maintainer on Packagist. Are you able to merge changes? Given that this library almost never changes, if we can tag a new version for Packagist, I think the maintenance work will be done for a long time to come.

@schengawegga
Copy link
Collaborator Author

Change looks sane to me. Maybe @alecpl has thoughts?

@till can you publish a new release? and i am very interested in maintaining these package. Can you give me permissions to maintain these package too? It is a very helpful and widespreaded package, so it should be good maintained in the future.

@ashnazg
Copy link
Member

ashnazg commented Aug 3, 2022

I'll look at getting a release out in the next week or so.

@till
Copy link
Member

till commented Aug 3, 2022

@ashnazg I would help, but I unlearned how to do the PEAR releases, and also don't want to burden my brain. But if you document it somewhere, I can help next time around. Or did we stop doing these? :D

@till
Copy link
Member

till commented Aug 3, 2022

@schengawegga you can use the branch/commit in composer already:

{
    "name": "your/package",
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/pear/Mail.git"
        }
    ],
    "require": {
        "pear/mail": "dev-master#PUT-COMMIT-HERE"
    }
}

@schengawegga
Copy link
Collaborator Author

I'll look at getting a release out in the next week or so.

@ashnazg Thank you very very much. I am very happy about your effort. This will help us very much.

@ashnazg @till How do you think about my proposal to helping you in developing this package?
But not only this package, i plan a pull-request for PEAR/DB, because this is also a very helpful package in our project, and i will help to keep all these packages well maintained in the future.
So can you help me please to getting a part of the development team, to help you and take a little bit of work off your hands?

@schengawegga
Copy link
Collaborator Author

@schengawegga you can use the branch/commit in composer already:

{
    "name": "your/package",
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/pear/Mail.git"
        }
    ],
    "require": {
        "pear/mail": "dev-master#PUT-COMMIT-HERE"
    }
}

@till Thanks for the reply. This is also a very good solution. But i am also interested in learning to keep these packaging well maintained. Thats the reason why i am asking you all to be part of the development team. I think these PEAR packages are so valuable and helpful, so they have to be well maintained in the future. And to ensure that, i will help you all with the development work.

@ashnazg
Copy link
Member

ashnazg commented Nov 12, 2022

@alecpl , should I mark you as inactive on the maintainer list?

@alecpl
Copy link
Contributor

alecpl commented Nov 12, 2022

Yes, please.

@ashnazg
Copy link
Member

ashnazg commented Nov 24, 2022

@schengawegga , I've added you as a Maintainer on the Mail project now.

@schengawegga
Copy link
Collaborator Author

@ashnazg Thank you for adding me as a maintainer to this project.
@MegaphoneJon i published a new release on GitHub and pear.php.net.
Thanks all for your support.

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

Successfully merging this pull request may close these issues.

5 participants