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

add STARTTLS support to aiosmtpd cli #172

Closed
dkg opened this issue Oct 5, 2019 · 6 comments · Fixed by #252
Closed

add STARTTLS support to aiosmtpd cli #172

dkg opened this issue Oct 5, 2019 · 6 comments · Fixed by #252

Comments

@dkg
Copy link

dkg commented Oct 5, 2019

It would be great to be able to have the aiosmtpd cli support offering STARTTLS.

@waynew
Copy link
Collaborator

waynew commented Oct 14, 2019

I would be 👍 on a PR that implemented this feature. Looking at https://aiosmtpd.readthedocs.io/en/latest/aiosmtpd/docs/smtp.html#enabling-starttls I think if we had the flags:

--tlscert cert.pem --tlskey key.pem --requiretls

the presence of which add the the context, that would be awesome.

Obviously we would want requiretls to be an invalid option if cert & key weren't present, the presence of either cert or key without the other should be an error.

@dkg would you be interested and able to work on this?

@pepoluan
Copy link
Collaborator

pepoluan commented Jan 1, 2021

While we're at it, should we also add support for SMTPS?

If so, we'll need to add these options:

  • --smtpscert <certfile> --smtpskey <keyfile> for SMTPS (Controller does the SSL)
  • --tlscert <certfile> --tlskey <keyfile> for STARTTLS (SMTP does the SSL)
    • --requiretls option dependent on --tlscert and --tlskey

@pepoluan
Copy link
Collaborator

I'm implementing this right now in a branch (not yet pushed)

One change from the above discussion: --requiretls is inverted into --no-requiretls, so the default is secure.

@waynew
Copy link
Collaborator

waynew commented Feb 20, 2021

I think that's a good idea but that will break backwards compatibility, right?

@pepoluan
Copy link
Collaborator

pepoluan commented Feb 20, 2021

I think that's a good idea but that will break backwards compatibility, right?

Well... no?

Because originally there was no --requiretls option at all...

There isn't even support for SMTPS/STARTTLS for cli ... so I'm adding to a practical green field.

My note up there was just explaining my decision to implement --no-requiretls instead of --requiretls as previously discussed.

@waynew
Copy link
Collaborator

waynew commented Feb 22, 2021

Ah -- well never mind then 😂

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

Successfully merging a pull request may close this issue.

3 participants