Giter Site home page Giter Site logo

Comments (6)

Mortal avatar Mortal commented on August 28, 2024 2

I think we can label this issue "rubber ducking" :-)

Thanks for the PR and for figuring this out!

from aiosmtpd.

jaraco avatar jaraco commented on August 28, 2024

One approach I'm considering is to use a value other than None as the sentinel for "hostname unspecified", have that value be translated into ::1.

But as I consider that, I realize the issue is broader. What if one specifies "::1" or relies on the default fallback - that binding also will be IPv6 only.

I'd really like to be able to bind to all interfaces in a dual-stack way.

from aiosmtpd.

jaraco avatar jaraco commented on August 28, 2024

I do see that one may pass ['::1', '127.0.0.1'] for hostname, and that does bind to both stacks. Similarly, ['::0', '0.0.0.0'] works.

from aiosmtpd.

jaraco avatar jaraco commented on August 28, 2024

Also, binding to 'localhost' will bind similarly to ['::1', '127.0.0.1'], but as far as I know, there's no way to simply specify "all interfaces".

Another solution I'm considering is for aiosmtpd to present a constant:

all_interfaces = ['::0', '0.0.0.0']
"hostname to bind to all interfaces"

And use that in the example server to draw attention to it.

from aiosmtpd.

jaraco avatar jaraco commented on August 28, 2024

Aha! I just noticed that create_server also accepts '' to indicate all interfaces. And that does work in aiosmtpd. I think for now I'll update the docstring to reflect that as a recommendation.

from aiosmtpd.

jaraco avatar jaraco commented on August 28, 2024

I've presented a PR, and that approach feels minimally invasive to address the concern.

from aiosmtpd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.