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

SMTP Binding Port configurable via Environment variable #254

Closed
Aladdin-97 opened this issue Jul 27, 2023 · 2 comments
Closed

SMTP Binding Port configurable via Environment variable #254

Aladdin-97 opened this issue Jul 27, 2023 · 2 comments

Comments

@Aladdin-97
Copy link

Is your feature request related to a problem? Please describe.
Running on K8s/Openshift port 25 is reserved and can't be used, causing this issue:

[18:35:33 INF] Starting Server Smtp
[18:35:33 ERR] Unable to Create SMTP Server Listener on Any:25. After 5 Retries. Failing
System.Net.Sockets.SocketException (0x80004005): Permission denied
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at Papercut.Network.Smtp.Server.CreateListener() in /home/travis/build/jijiechen/Papercut/src/Papercut.Network/Smtp/Server.cs:line 163
   at Papercut.Network.Smtp.Server.Start() in /home/travis/build/jijiechen/Papercut/src/Papercut.Network/Smtp/Server.cs:line 235
   at Papercut.Network.Smtp.ServerExtensions.<>c__DisplayClass0_0.<BindObservable>b__0(IObserver`1 o) in /home/travis/build/jijiechen/Papercut/src/Papercut.Network/Smtp/ServerExtensions.cs:line 47

Describe the solution you'd like
It would be great to set the port to bind in order to avoid this issue also on k8s platform

Describe alternatives you've considered
I thought i could change by replacing on runtime but they are all binary file, which isn't possibile.

Thanks for your consideration and time.
Best Regards

@Jaben
Copy link
Member

Jaben commented May 10, 2024

I'm moving the configuration to Microsoft.Configuration for the next release which does support environmental variables. If you want to download and build the server in dev it already supports this -- otherwise you can wait till I get time to make a new release.

@Jaben Jaben closed this as completed May 10, 2024
@a7md0
Copy link

a7md0 commented Nov 6, 2024

What is the environment variable to change the SMTP port?

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

No branches or pull requests

3 participants