Api or script for disable email on NethServer

NethServer Version: 7.9.2009
Module: email

Hello everyone! I need help.

We use NethServer 7.9.2009 at my company as a mail server. We are using plain text in terminal to create a user’s email in nethserver, but we have a problem with disabling the email.

How can I disable user mail accounts from the terminal?
Maybe Script, plain text or API?

Hi,

welcome to NethServer Community.

Disable Mail for a user:

db accounts setprop user@domain.tld MailStatus disabled

Apply config:

signal-event nethserver-mail-server-save

See also the documentation.

2 Likes

Thanks. It`s works for my.

1 Like