[Dovecot] Disable IMAP for ONE user only

SIW bov at bsdpanic.com
Mon May 5 21:49:52 UTC 2014


I'm beginning to wonder if I am going about this all wrong :-)

Would it not be easier/better to leave all IMAP/SMTP access in place 
(for all users) and then just use "one time throw away passwords" for 
logging in from an internet cafe with Roundcube?

Can this be done? So after you login it just deletes the password you 
have logged in with. Can you have one username with many (throw away) 
passwords? But keep one password that is used for IMAP/Thunderbird as 
you don't want that password being deleted/removed from the system!

On 05/05/2014 22:33, Rick Romero wrote:
> Duh.  'ONE user only' would be the clue.  So your query would be like:
> SELECT email as user, if(%r = '127.0.0.1' & user = 'yourloginname',
> password,imap_password) as password FROM virtual_users WHERE email='%u';
>
> Also, test ! and Google!   I'm throwing this out off the top of my
> head..  I think the double == was wrong.
>
> The best way test this is just replace the %u with your username and %r
> with either 127.0.0.1 or anything else on the MySQL command line and make
> sure what's returned is the password you're expecting.
>
> Rick
>



More information about the dovecot mailing list