Debian Codegraph @

doc/html/_sources/imap/reference/admin/sop/userdeny.rst.txt

raw
1 Managing user_deny.db
2 =====================
3
4 The user_deny database allows you to deny access via POP/IMAP even if the user can authenticate to the Cyrus server. For example, if the authentication data is also used for other network services.
5
6 Use :cyrusman:`cyr_deny(8)` to manage the database.
7
8 If the user_deny.db file doesn't exist in %configdirectory% (often /var/lib/imap) then you'll need to create it. In the example below, /var/lib/imap/ is used.
9
10 ::
11
12 # echo "" > /tmp/user_deny.flat
13 # /usr/lib/cyrus-imapd/cvt_cyrusdb /tmp/user_deny.flat flat /var/lib/imap/user_deny.db skiplist
14 # chown cyrus:cyrus /var/lib/imap/user_deny.db
15
16 The database specification can be found at :ref:`imap-concepts-deployment-db-userdeny`.
17
18 ::
19
20 # su - cyrus
21 $ cyr_dbtool /var/lib/imap/user_deny.db skiplist set **username** "2<tab>pop3<tab>Can't use pop."
22
23 Here `pop3` is the service name as spelled in :cyrusman:`cyrus.conf(5)`. In order to type a tab character, you will need to escape your tabs. In bash, this is done by typing CTRL-v and then pressing Tab.
24
25 If you got it right, when you authenticate via pop3 you should see something like the following::
26
27 $ telnet mail.example.org 110
28 Trying 192.168.0.2...
29 Connected to mail.example.org.
30 Escape character is '^]'.
31 +OK mail.example.org Cyrus POP3 v2.4.17 server ready <[email protected]>
32 USER **username**
33 +OK Name is a valid mailbox
34 -ERR [SYS/TEMP] Can't use pop.
35 Connection closed by foreign host.
36