File: userdeny.rst.txt

package info (click to toggle)
cyrus-imapd 3.10.0~beta1-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 86,332 kB
  • sloc: ansic: 284,810; perl: 135,824; javascript: 9,562; sh: 5,728; yacc: 2,565; cpp: 2,147; makefile: 2,133; lex: 662; xml: 621; awk: 303; python: 279; asm: 262
file content (36 lines) | stat: -rw-r--r-- 1,529 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Managing user_deny.db
=====================

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.

Use :cyrusman:`cyr_deny(8)` to manage the database.

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.

::

    # echo "" > /tmp/user_deny.flat
    # /usr/lib/cyrus-imapd/cvt_cyrusdb /tmp/user_deny.flat flat /var/lib/imap/user_deny.db skiplist
    # chown cyrus:cyrus /var/lib/imap/user_deny.db

The database specification can be found at :ref:`imap-concepts-deployment-db-userdeny`.

::

    # su - cyrus
    $ cyr_dbtool /var/lib/imap/user_deny.db skiplist set **username** "2<tab>pop3<tab>Can't use pop."

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.

If you got it right, when you authenticate via pop3 you should see something like the following::

    $ telnet mail.example.org 110
    Trying 192.168.0.2...
    Connected to mail.example.org.
    Escape character is '^]'.
    +OK mail.example.org Cyrus POP3 v2.4.17 server ready <18418688457439930663.1399062365@mail.example.org>
    USER **username**
    +OK Name is a valid mailbox
    -ERR [SYS/TEMP] Can't use pop.
    Connection closed by foreign host.