Don't use blocked ports for mailhog

It appears that Local is incrementing the port number that is used by Mailhog, without looking to see if that port number is blocked.

In this case, port 4045 was selected, which according to Apple’s webkit source is considered a blocked port: https://trac.webkit.org/browser/releases/Apple/Safari%20Technology%20Preview%2013/WebCore/platform/URL.cpp#L2308

This causes a Not Allowed to use restricted network port.

Is there a way to manually change the port used by Mailhog before the bug is fixed?

Hi Timothy,

Thanks for the report! I went ahead and filed this in our issue tracker.

In the meantime, you can export the site and then re-import it to get a new container and set of ports. Another thing you can do is clone the site in case you made any changes inside the container like installing software using apt-get.

Does that have a different effect than deleting and doing a new install? Because in that case I keep getting assigned the same port.

Deleting the site will release the ports. You might have to keep that site temporarily until a fix is added.

I’ll make sure those ports in that array are excluded in Local.

Gotcha, thanks Clay!