NS8 Smarthost for sending mail


While evaluating/testing NS8 on Debian 12 with (Samba) AD, Mail (and SOGo) I did not find where/how to configure an (external) smtp-host for sending mail (i.e smart-host) in the UI.

On the node is is possible to configure one for the notifications which seem to be configured oke:

{"port": 25, "host": "smtp.XXXX.nl", "username": "postmaster@XXXX.nl", "password": "MYPASSWD", "enabled": true, "encrypt_smtp": "starttls", "tls_verify": true}

In the end managed to configure it in the container in /etc/postfix/main.cf.d

$ sudo runagent -m mail1 bash
$ podman exec -ti postfix cat /etc/postfix/main.cf.d/smart_host.cf
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = lmdb:/etc/postfix/main.cf.d/sasl_passwd
smtp_sasl_mechanism_filter = plain, login
smtp_sasl_security_options =
smtp_tls_policy_maps = lmdb:/etc/postfix/main.cf.d/tls_policy

# global smarthost is enabled
relayhost = [smtp.XXXX.nl]:25

OT took me long to realize postfix does not understand the hash: type anymore it’s lmdb: nowadays…

Is the absence of possibility to configure an external smtp(smart)host for outgoing mail by design or something still under consideration?

1 Like

Relay hosts configuration (or mail routes) formerly known as Smarthost in ns7 is a planned feature, still not implemented. In future releases it will be configured from UI.

Meanwhile thank you for the Postfix customization example. You read the docs, pure joy for me.

Mark, I’m really happy to read again from you (There will be a talk about ARM and NS8 at our community meeting Saturday afternoon at Fosdem, but I didn’t say it).


@mark_nl give us the gist after the discussions, would you

I did not test it but I think this should do it?

5 posts were merged into an existing topic: Pop3 connector feature

No, not for outgoing mail of the mail server-module.
At least for me it did not use this settings in de mail-module, but i did configure the outgoing smtphost for notifications after installing the mail-module. So maybe its because of this or configured it wrong. I’ll check again although pretty sure I did configured it correctly…

You did it right, Mark. By now your custom configuration is correct for routing messages from Mail through an external MTA.

Email notifications panel is for other applications and should work for everything but Mail.

The planned idea is:

  • add some button into the Mail configuration to easily change “Email notifications” setup and say to the whole cluster to route app messages through the Mail instance
  • add mail routing/relay rules to Mail, based on sender/recipient as NS7, or setup a default relay (like Mark did in the custom config) – the latter differs from NS7 approach but is equivalent in the end

The rationale behind this is that a cluster can have or not have a properly configured Mail module, and in some cases could have more than one Mail servers spread among the cluster nodes. In any scenario some applications need a SMTP server to send messages.


Did we have an howto for getting postfix run with an smarthost like ionos or other ones? i try it now for around two days but its seems allways that way the mail1 is sending directly to the other mailserver and sure i got the refused to talk to me: 554-gmx.net (mxgmx009) Nemesis ESMTP Service not available 554-No SMTP service 554-IP address is block listed. 554 For explanation visit 554 Nemesis ESMTP Service not available No SMTP service IP address is block listed.)

I am very curious about this smarthost thing, all modules have some smarthost component for automatically getting a mail detail and using them for smtp, but have been asking myself question on the where from…

it is rare that dev´s dont write a word… so is there a possibility in the future maybe? would be great to hear something…

@hucky what do you want to hear from the developers

With core up to date:
Cluster Settings → Email notifications