Disable user login for a few seconds ?
Robert Schetterer
rs at sys4.de
Fri Jul 4 09:33:35 UTC 2014
Am 04.07.2014 10:52, schrieb Florent B:
> Hi all,
>
> I need to move e-mail files of my users from one file system to another.
>
> I use a MySQL backend on Dovecot 2.1.
>
> How can I do to disable temporary an account while moving files ?
>
> I have an "active" bit in my DB, but if I set it to 0, my MX servers are
> bouncing mails.
>
> How can I do to disable temporary an account ? In fact, I need dovecot
> not to do any change on files...
>
> I think I could change account password for a while, and reset it after
> migration, but it will disturb connected users.
>
> Maybe I could chmod 0 files on my old file system during migration ? How
> Dovecot will act ?
>
> Thank you :)
>
> Flo
>
read about this
http://wiki2.dovecot.org/Authentication/RestrictAccess
and/or
if your user has static ip use firwall to reject ( be aware of nat )
and/or
change behave of sql active table with i.e postfix to tmp fail etc
i.e ( dont copy paste ,must fit to your postfix(sql)config !!! )
smtpd_recipient_restrictions = reject_unknown_recipient_domain,
reject_non_fqdn_recipient,
permit_mynetworks,
check_recipient_access
mysql:/etc/postfix/mysql_virtual_inactive_mailaddress.cf,
mysql_virtual_inactive_mailaddress.cf
...
query = SELECT CONCAT('421 mailaddress %s is set in inactive mode')
address FROM mailbox WHERE username='%s' AND active = '0'
be aware of all other involved postfix/sql tables where active = 0 is
honored too, do hard testing before use in production
after all change password might be the most easy way for only seconds
Best Regards
MfG Robert Schetterer
--
[*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein
More information about the dovecot
mailing list