One-time password for using the NS8 mail server instance

NethServer Version: 8
Module: Mail

Hi Friends,

I installed and set up Peppermint as a Docker container. There, I can set up the mail server of my NS instance as an SMTP server for sending emails. However, it asks for a username and the corresponding password of the NS 8 user. I would like to avoid storing a user password there.

I know from Mailcow that you can assign a one-time password for other programmes that access the server. Similar to Nextcloud. Is there something similar for the NS8 mail instance?

Regards…

Uwe

Hi @transocean , what is ‘Peppermint’ please?

1 Like
2 Likes

No, app/device passwords like oauth2 are not yet available in NS8 mail but postfix seems to support it so it could be nice Feature request.

2 Likes

@transocean, do you like peppermint? What’s the advantage in comparison to Zammad or GLPI?

Here’s how to install it in a scratchpad on NS8:

# Enter scratchpad environment
runagent -m scratchpad1

# Enable podman-restart service
systemctl --user enable podman-restart

# Create pod      
podman pod create --infra-conmon-pidfile ./peppermint-pod.pid \
    --pod-id-file ./peppermint-pod.pod-id \
    --network slirp4netns:allow_host_loopback=true \
    --name peppermint-pod \
    -p 33333:3000 \
    -p 5003:5003 \
    --replace

# Run postgres container
podman run -d \
      --name peppermint-postgres \
      --restart=always \
      --pod-id-file ./peppermint-pod.pod-id \
      -v pgdata:/var/lib/postgresql/data:z \
      -e POSTGRES_USER=peppermint \
      -e POSTGRES_PASSWORD=1234 \
      -e POSTGRES_DB=peppermint \
      docker.io/library/postgres:latest

# Run peppermint container
podman run -d \
      --name peppermint \
      --restart=always \
      --pod-id-file ./peppermint-pod.pod-id \
      -e DB_USERNAME=peppermint \
      -e DB_PASSWORD=1234 \
      -e DB_HOST=peppermint-postgres \
      -e SECRET=peppermint4life \
      docker.io/pepperlabs/peppermint:latest

Then add a http route to http://localhost:33333 and it should work to browse via HTTP/HTTPS.

2 Likes

Hi @mrmarkuz

I am currently testing the software available on the NS 8 Wiki on a separate Docker instance. Primarily the ones that are also linked by my colleagues at Genius. This has the advantage for me that I don’t jeopardise my NS 8 instance if something doesn’t work properly. My primary concern is the learning effect. With Peppermint, however, I am impressed by its ease of use. Thank you for the instructions.

1 Like

@mrmarkuz

Peppermint is running smoothly on NS 8.

1 Like

Hmm…,

After rebooting NS 8, the container does not start and I get a ‘Bad Gateway’ error.

Is it possible that the container does not start automatically when NS 8 is launched and that it may need to be instructed to do so?

Usually the podman containers in NS8 are started by systemd services which are missing in this scratchpad example.
I’m going to add the services and release an app…

1 Like

I missed something like restart:always. Is that what’s missing?

1 Like

Yes, you can use --restart=always but to work in podman the podman-restart service needs to be enabled.
I adapted the instructions.

1 Like