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

How do I change the IP/Port of the SMTP server? #286

Open
Infinoid opened this issue Feb 25, 2025 · 0 comments
Open

How do I change the IP/Port of the SMTP server? #286

Infinoid opened this issue Feb 25, 2025 · 0 comments

Comments

@Infinoid
Copy link

Infinoid commented Feb 25, 2025

Hi,

I've been trying to use papercut in a development environment that runs in an ipv6-only kubernetes cluster, and had a few problems. It seems like the configuration values for SMTP server IP and Port are ignored?

My goals are to listen on address :: (IPv6Any) and port 8025. However, whatever I try, the container logs always say:

[timestamp] Starting Smtp Server on 0.0.0.0:25...

I'm unable to affect the above, neither address nor port, no matter what I do. I was able to change the HTTP addr/port easily by adding a Urls field to appsettings.json, so this seems to only be a problem for SMTP.

I've tried:

appsettings.json:

{
  "SmtpServer": {
    "Port": 8025
  }
}

appsettings.Production.json:

{
  "SmtpServer": {
    "Port": 8025
  }
}

Papercut.SMTP.Service.Settings.json:

{
  "Port": "8025"
}

Papercut.Service.Settings.json:

{
  "Port": "8025"
}

environment vars:

  • PORT=8025
  • SMTP_PORT=8025

The only way I could find to get it working is to run a reverse proxy process to forward incoming ipv6 connections to ipv4, and run the process as root within its container (because binding to ports < 1024 requires special credentials).

So, I want to ask: what's the right way to configure the SMTP service's ip/port when running the papercut-smtp docker image? And would it be possible to provide an example of that?

Thanks!

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

1 participant