Mail server - Internal user: send message

Hi eveyone,
I’ve setup NethServer 7.9.2009 only as a mail server (SOGo, WebMail,) with AD integration.
I have a lot of user with “Internal address” (Mail → Address → “Internal”) but they can send external mail. Can I block this users to send mail outside my domain (or outside my internal network)?
I don’t have a option Mail → Edit → “Internal network” (or something like that).
Many thanks
P.S.: Yes, I’ve used “find” and have’n find anythinks

Hi Renzo

Technically I think you can, however not seems that until now was asked in the community as usercase.

I’ll try to explain myself better: Postfix (the piece of software that delivers emails inside and outside NethServer) surely can be programmed to do that, however I’m not sure this can be configured from Cockpit currently.

AFAIK, the “internal” mailbox setting only limits the capability of delivering to the mailboxes.
Internal mailboxes? Only messages sent via NethServer can be delivered to that mailbox.
Public mailboxes? Every server if internet can submit messages for that mailbox.
This specific setting however is made on * Dovecot*, the piece of software that manage incoming messages.

If you can avoid authenticating the users, you can only send emails to the system domains.
Please, tell us more about the problem you are trying to solve, as we may have a better solution.

I’ll try to explain what I need.
I’ve configured my Nethserver as a mail server with users come from MS AD (MS domain integration with domain “mydomain.it”).
I need that a subset MS domain users (i.e. John Smith, etc.) must not be send or receive mail fom domains outside mydomain.it.
If I check “Make internal” the user address (Email → Addresses, see attach), john.smith@mydomain.it cannot receive mail from users outside @mydomain.it and this solve half of my problem.
The other half is that john.smith@mydomain.it should not be able to send outside of domain: it must send only send and/or receive mail with other user of the domain @mydomain.it.
Thanks a lot

If john.smith writes an email to me, I’ll receive a non-existent address error when I reply to him.

The only way I know to block relay is, as said above, to disable authentication.
Maybe, something better could be added by writing some code.

I assume you refer to “pop3 before smtp” (or similar), correct?

Yes, of course, you can tell to Postfix to deny to delivery mail outside my domain but I don’t know if this setting is available per user (i.e. john.smith@mydomain.it cannot send outside and jane.doe@mydomain.it yes).

No, I mean, smtp auth (submission on port 587), but I think that it will not work with MUAs running on localhost (i.e. roundcube, sogo, webtop).

You could try to follow postfix documentation:
https://www.postfix.org/RESTRICTION_CLASS_README.html