1

Topic: Disabling particular user mailbox.

I am managing an iRedmail server which hosts multiple user mailboxes. From time to time, I need to disable a particular user's mailbox so that it accepts no incoming emails, for various reasons including that the user's subscription has expired, but external sources still send emails to his mailbox.

The goals I have in mind are:
1 keep the mailbox's existing data, so that I can access its data in case the user reactivates his subscription;
2 bail out of the Postfix pipeline as early as possible, so that these unwanted emails don't consume much server resource;
3 disabling/enabling mailbox should be fully automated, like flipping a bit on/off in the DB.

Any suggestion on how I can achieve this?

Thanks a lot in advance!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Disabling particular user mailbox.

please ALWAYS ALWAYS ALWAYS show us basic info of your iRedMail server, this helps us to give YOU precise/accurate answer which helps you to solve issue quickly, and save our (both of us) time to wait for another one to reply.

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

If you're running SQL backend, set values of 3 SQL columns to 0 (in "vmail" sql db) for that user:

- mailbox.enabledeliver
- mailbox.enablelda
- mailbox.enablelmtp

If you're running LDAP backend, remove 3 ldap attribute/value pairs of that user:

- enabledService=deliver
- enabledService=lda
- enabledService=lmtp

If you want to enable them again, just set it to 1 (SQL backends) or add the missing ldap attribute/value pairs.

3

Re: Disabling particular user mailbox.

Hi Huangbin,

Your solution works like a charm!

Thank you very much for your help!

Hifall