[Dovecot] Disable IMAP for ONE user only

Rick Romero rick at havokmon.com
Mon May 5 18:00:34 UTC 2014


  Quoting Marcin Mirosław <marcin at mejor.pl>:

> W dniu 2014-05-05 19:21, Marcin Mirosław pisze:
>> W dniu 2014-05-05 18:39, SIW pisze:
>>> I use MySQL to store my virtual users passwords and I am running the
>>> latest version of Dovecot.
>>>
>>> What I need to do is have one particular user have ONLY access to their
>>> email via Roundcube (webmail) and no IMAP/SMTP access.
>>>
>>> Therefore, how do I disable IMAP/SMTP access for just one user?
>>
>> Hi!
>> Use variable %s in query (http://wiki2.dovecot.org/Variables ). E.g. you
>> can use new column in table or use CASE in SELECT statement if you don't
>> need to change schema of table.
>
> Simpler query could look SELECT foo FROM bar WHERE ... AND
> (%u!='blocked at user' AND %s != 'imap')

You can also use Bit Operators directly via SQL - like in vpopmail. 

http://wiki2.dovecot.org/AuthDatabase/VPopMail


More information about the dovecot mailing list