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

Potential / trivial bug to instantiate service twice on same IP address #26

Closed
TomFreudenberg opened this issue Nov 29, 2018 · 3 comments

Comments

@TomFreudenberg
Copy link
Member

While working on PR for mailcatcher the issue / enhancement #25 was seen. That also opens the potential for wrong initialization of SMTP server instances.

if e.g. using 'localhost' and '127.0.01' for host name pattern, MidiSmtpServer will try to instiate twice on same address.

Expected behavior

To prevent that, the given hosts (ips and names) should been resolved to their ip address and then instatiated on the ip addresses.

@TomFreudenberg TomFreudenberg added this to the 2.3.2 milestone Nov 29, 2018
@TomFreudenberg TomFreudenberg self-assigned this Nov 29, 2018
@gencer
Copy link
Contributor

gencer commented Jan 24, 2019

Hey @TomFreudenberg, is there any news on this and other issues? It's been a while since your last commit.

@TomFreudenberg
Copy link
Member Author

TomFreudenberg commented Jan 17, 2020

I am just before launching release 3 of midi-smtp-server.

This will not be "magically" resolved!

Reason: In many tests and thoughts I did during the last updates, I came to the conclusion that it is very important that the administrator of a running service is aware on the ip-addresses and ports the midi-smtp-server components are listening on.

So doing some magically fixes on wrong defined parameters will not help to make the world better :-) So for that, my highly suggested proposal is to define ip-addresses as ipv4 and ipv6 adresses and not use loose namings to bind services on.

If your server will handle ipv4 and ipv6 network, the "localhost" parameter will bind on both adapters. If you have to define only one or have to be sure that both are available, better use "127.0.0.1, ::1" as parameter.

This is not a bug anymore but wished feature. If you define somewhere same ip-addresses in the end, midi-smtp-server will raise exception like "cannot bind to address:port - already in use"

Cheers
Tom

@gencer
Copy link
Contributor

gencer commented Jan 17, 2020

Hey @TomFreudenberg! It's good to see you back on this!

For the reply; I see. Thanks for the clarification.

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

No branches or pull requests

2 participants