1

Topic: What is the best way to "suspend" a user?

iRedMail 0.8.5 - MySQL - RHEL

What is the best method to "suspend" a user?  That is, is there a way to disable their access without totally deleting the account yet?  Can a change simply be made to their MySQL row entry?

The create mysql user script works great, btw; it would be great to have "suspend" and "delete" shell scripts that take usernames (email addresses) as parameters, etc.

----

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

2

Re: What is the best way to "suspend" a user?

Disable it with SQL row: mailbox.active, alias.active.

3

Re: What is the best way to "suspend" a user?

Wouldn't this bouce new emails for this user?

Is there any way how to suspend the access but still accept new emails for this account?
Currently, I set in my script mailbox.enable* to 0, but is there better way how to achieve this?

4

Re: What is the best way to "suspend" a user?

camel1cz wrote:

Wouldn't this bouce new emails for this user?

Is there any way how to suspend the access but still accept new emails for this account?
Currently, I set in my script mailbox.enable* to 0, but is there better way how to achieve this?

Right, I mean to specify the same thing; keep receiving emails, just lock them out.

5

Re: What is the best way to "suspend" a user?

Well, you didn't mention you want to keep receiving emails...

OK, here's solution for you:

*) Keep below SQL columns on table "vmail.mailbox" set to 0:

enablepop3
enablepop3secured
enableimap
enableimapsecured
enablesieve
enablesievesecured

It will disable POP3/POP3S/IMAP/IMAPS/Managesieve services for this user.

*) Keep below column on table "vmail.mailbox" set to 1:

enablesmtp
enablesmtpsecured
enabledeliver

It will allow Postfix to accept emails for this user, and allow Dovecot LDA to deliver accepted email to user mailbox.

NOTE: with enablesmtp=1 and enablesmtpsecured=1, this user is allowed to send email via SMTP/Submission.

6

Re: What is the best way to "suspend" a user?

Thanks Zhang,

is there any way how to disable SENDING emails via SMTP AUTH and still allow the account to receive emails? My concern is to disable SMTP AUTH for the account, receiving is not so important.

7

Re: What is the best way to "suspend" a user?

camel1cz wrote:

is there any way how to disable SENDING emails via SMTP AUTH and still allow the account to receive emails? My concern is to disable SMTP AUTH for the account, receiving is not so important.

Did you try to set "mailbox.enablesmtp=0" and "mailbox.enablesmtpsecured=0" but keep "mailbox.enabledeliver=1"?

8

Re: What is the best way to "suspend" a user?

ZhangHuangbin wrote:

Did you try to set "mailbox.enablesmtp=0" and "mailbox.enablesmtpsecured=0" but keep "mailbox.enabledeliver=1"?

It works! Thanks!