Usermin and Roundcube quota display

Webmin
wyrrwas
2011-12-16
2013-05-22
  • wyrrwas
    wyrrwas
    2011-12-16

    Hello,

    I have already installed Webmin and Virtualmin. Under Virtualmin i create new Virtual Server, also I installed Roundcube.
    Moreover I set disk limit for mailboxes to 2GB.
    Why I don't see mailbox qouta in Usermin and Roundcube as well?
    Where can I change this setting?

    Second question is, how to set maximum file size attached to mail? (globally for Virtual Server and displayed in Roundcube as well).

    Thank you, hope you will help.

     
  • Mks Akula
    Mks Akula
    2012-03-05

    Hi,

    If you are using Dovecot as imap server in order to see in roundube your mailbox quota, you need to login in your panel and select webmin -> servers -> Dovecot IMAP/POP3 Server -> Edit config files and:
    1. protocol imap {
      #mail_plugins =
    }
    becomes
    protocol imap {
      mail_plugins = quota imap_quota
    }
    2. plugin {
    #quota = maildir
    }
    becomes
    plugin {
    quota = fs:maildir
    }

    Good luck !

     
  • wyrrwas
    wyrrwas
    2012-03-07

    Hi,

    Thanks for you response.
    I changed as you wrote and now I see quota bar in roundcube but it shows… nothing. It says "Used space: unknown".

    In devecot.conf file I have every single line hashed (commented with # at the begining).
    In addition I checked other config file such as dovecot-sql.conf and there are also all lines hashed.

    I use Webmin 1.570 with Virtualmin 3.89 installed, Postfix and Devecot as a mail servers.
    Is there any way to turn on this quota bar in Roundcube to show proper mail box usage?

    Thanks in advance.

     
  • Mks Akula
    Mks Akula
    2012-03-07

    Hi again,

    With welcome! I use also webmin 1.570 but my virtualmin is 3.90!
    Anyway please find bellow a part of my /etc/dovecot/dovecot.conf ! I used bold for the settings that i added in order to see quota. Also please be informed that you need to restart your dovecot server after.

    ## Dovecot configuration file


    ##
    ## IMAP specific settings
    ##

    protocol imap {
      # Login executable location.
      #login_executable = /usr/lib/dovecot/imap-login

      # IMAP executable location. Changing this allows you to execute other
      # binaries before the imap process is executed.
      #
      # This would write rawlogs into user's ~/dovecot.rawlog/, if it exists:
      #   mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
      # </usr/doc/dovecot-common/wiki/Debugging.Rawlog.txt>
      #
      # This would attach gdb into the imap process and write backtraces into
      # /tmp/gdbhelper.* files:
      #   mail_executable = /usr/lib/dovecot/gdbhelper /usr/lib/dovecot/imap
      #
      #mail_executable = /usr/lib/dovecot/imap

      # Maximum IMAP command line length in bytes. Some clients generate very long
      # command lines with huge mailboxes, so you may need to raise this if you get
      # "Too long argument" or "IMAP command line too large" errors often.
      #imap_max_line_length = 65536

      # Maximum number of IMAP connections allowed for a user from each IP address.
      # NOTE: The username is compared case-sensitively.
      mail_max_userip_connections = 10

      # Support for dynamically loadable plugins. mail_plugins is a space separated
      # list of plugins to load.
      mail_plugins = quota imap_quota
      #mail_plugin_dir = /usr/lib/dovecot/modules/imap

      # IMAP logout format string:
      #  %i - total number of bytes read from client
      #  %o - total number of bytes sent to client
      #imap_logout_format = bytes=%i/%o

      # Override the IMAP CAPABILITY response.
      #imap_capability =

      # How many seconds to wait between "OK Still here" notifications when
      # client is IDLEing.
      #imap_idle_notify_interval = 120

      # ID field names and values to send to clients. Using * as the value makes
      # Dovecot use the default value. The following fields have default values
      # currently: name, version, os, os-version, support-url, support-email.
      #imap_id_send =

      # ID fields sent by client to log. * means everything.
      #imap_id_log =

      # Workarounds for various client bugs:
      #   delay-newmail:
      #     Send EXISTS/RECENT new mail notifications only when replying to NOOP
      #     and CHECK commands. Some clients ignore them otherwise, for example OSX
      #     Mail (<v2.1). Outlook Express breaks more badly though, without this it
      #     may show user "Message no longer in server" errors. Note that OE6 still
      #     breaks even with this workaround if synchronization is set to
      #     "Headers Only".
      #   netscape-eoh:
      #     Netscape 4.x breaks if message headers don't end with the empty "end of
      #     headers" line. Normally all messages have this, but setting this
      #     workaround makes sure that Netscape never breaks by adding the line if
      #     it doesn't exist. This is done only for FETCH BODY
      #     commands. Note that RFC says this shouldn't be done.
      #   tb-extra-mailbox-sep:
      #     With mbox storage a mailbox can contain either mails or submailboxes,
      #     but not both. Thunderbird separates these two by forcing server to
      #     accept '/' suffix in mailbox names in subscriptions list.
      # The list is space-separated.
      #imap_client_workarounds =
    }
     
    ##
    ## POP3 specific settings
    ##

    protocol pop3 {
      # Login executable location.
      #login_executable = /usr/lib/dovecot/pop3-login

      # POP3 executable location. See IMAP's mail_executable above for examples
      # how this could be changed.
      #mail_executable = /usr/lib/dovecot/pop3

      # Don't try to set mails non-recent or seen with POP3 sessions. This is
      # mostly intended to reduce disk I/O. With maildir it doesn't move files
      # from new/ to cur/, with mbox it doesn't write Status-header.
      #pop3_no_flag_updates = no

      # Support LAST command which exists in old POP3 specs, but has been removed
      # from new ones. Some clients still wish to use this though. Enabling this
      # makes RSET command clear all \Seen flags from messages.
      #pop3_enable_last = no

      # If mail has X-UIDL header, use it as the mail's UIDL.
      #pop3_reuse_xuidl = no

      # Keep the mailbox locked for the entire POP3 session.
      #pop3_lock_session = no

      # POP3 UIDL (unique mail identifier) format to use. You can use following
      # variables, along with the variable modifiers described in
      # </usr/share/doc/dovecot-common/wiki/Variables.txt> (e.g. %Uf for the
      # filename in uppercase)
      #
      #  %v - Mailbox's IMAP UIDVALIDITY
      #  %u - Mail's IMAP UID
      #  %m - MD5 sum of the mailbox headers in hex (mbox only)
      #  %f - filename (maildir only)
      #
      # If you want UIDL compatibility with other POP3 servers, use:
      #  UW's ipop3d         : %08Xv%08Xu
      #  Courier             : %f or %v-%u (both might be used simultaneosly)
      #  Cyrus (<= 2.1.3)    : %u
      #  Cyrus (>= 2.1.4)    : %v.%u
      #  Dovecot v0.99.x     : %v.%u
      #  tpop3d              : %Mf
      #
      # Note that Outlook 2003 seems to have problems with %v.%u format which was
      # Dovecot's default, so if you're building a new server it would be a good
      # idea to change this. %08Xu%08Xv should be pretty fail-safe.
      #
    pop3_uidl_format = %08Xu%08Xv

      # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
      # won't change those UIDLs. Currently this works only with Maildir.
      #pop3_save_uidl = no

      # POP3 logout format string:
      #  %i - total number of bytes read from client
      #  %o - total number of bytes sent to client
      #  %t - number of TOP commands
      #  %p - number of bytes sent to client as a result of TOP command
      #  %r - number of RETR commands
      #  %b - number of bytes sent to client as a result of RETR command
      #  %d - number of deleted messages
      #  %m - number of messages (before deletion)
      #  %s - mailbox size in bytes (before deletion)
      #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s

      # Maximum number of POP3 connections allowed for a user from each IP address.
      # NOTE: The username is compared case-sensitively.
      mail_max_userip_connections = 10

      # Support for dynamically loadable plugins. mail_plugins is a space separated
      # list of plugins to load.
      mail_plugins = quota imap_quota
      #mail_plugin_dir = /usr/lib/dovecot/modules/pop3

      # Workarounds for various client bugs:
      #   outlook-no-nuls:
      #     Outlook and Outlook Express hang if mails contain NUL characters.
      #     This setting replaces them with 0x80 character.
      #   oe-ns-eoh:
      #     Outlook Express and Netscape Mail breaks if end of headers-line is
      #     missing. This option simply sends it if it's missing.
      # The list is space-separated.
      #pop3_client_workarounds =
    }

    ##
    ## Plugin settings
    ##

    plugin {
      # Here you can give some extra environment variables to mail processes.
      # This is mostly meant for passing parameters to plugins. %variable
      # expansion is done for all values.

      # Quota plugin. Multiple backends are supported:
      #   dirsize: Find and sum all the files found from mail directory.
      #            Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
      #   dict: Keep quota stored in dictionary (eg. SQL)
      #   maildir: Maildir++ quota
      #   fs: Read-only support for filesystem quota
      #
      # Quota limits are set using "quota_rule" parameters, either in here or in
      # userdb. It's also possible to give mailbox-specific limits, for example:
      #   quota_rule = *:storage=1048576
      #   quota_rule2 = Trash:storage=102400
      # User has now 1GB quota, but when saving to Trash mailbox the user gets
      # additional 100MB.
      #
      # Multiple quota roots are also possible, for example:
      #   quota = dict:user::proxy::quota
      #   quota2 = dict:domain:%d:proxy::quota_domain
      #   quota_rule = *:storage=102400
      #   quota2_rule = *:storage=1048576
      # Gives each user their own 100MB quota and one shared 1GB quota within
      # the domain.
      #
      # You can execute a given command when user exceeds a specified quota limit.
      # Each quota root has separate limits. Only the command for the first
      # exceeded limit is excecuted, so put the highest limit first.
      # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
      #   quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95
      #   quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
      quota = fs:maildir

      # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir
      # directory. You can also optionally give a global ACL directory path where
      # ACLs are applied to all users' mailboxes. The global ACL directory contains
      # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter
      # specifies how many seconds to wait between stat()ing dovecot-acl file
      # to see if it changed.
      #acl = vfile:/etc/dovecot/dovecot-acls:cache_secs=300

      # To let users LIST mailboxes shared by other users, Dovecot needs a
      # shared mailbox dictionary. For example:
      #acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes

      # Convert plugin. If set, specifies the source storage path which is
      # converted to destination storage (mail_location) when the user logs in.
      # The existing mail directory is renamed to <dir>-converted.
      #convert_mail = mbox:%h/mail
      # Skip mailboxes which we can't open successfully instead of aborting.
      #convert_skip_broken_mailboxes = no
      # Skip directories beginning with '.'
      #convert_skip_dotdirs = no
      # If source storage has mailbox names with destination storage's hierarchy
      # separators, replace them with this character.
      #convert_alt_hierarchy_char = _

      # Trash plugin. When saving a message would make user go over quota, this
      # plugin automatically deletes the oldest mails from configured mailboxes
      # until the message can be saved within quota limits. The configuration file
      # is a text file where each line is in format: <priority> <mailbox name>
      # Mails are first deleted in lowest -> highest priority number order
      #trash = /etc/dovecot/dovecot-trash.conf

      # Expire plugin. Mails are expunged from mailboxes after being there the
      # configurable time. The first expiration date for each mailbox is stored in
      # a dictionary so it can be quickly determined which mailboxes contain
      # expired mails. The actual expunging is done in a nightly cronjob, which
      # you must set up:
      #   dovecot -exec-mail ext /usr/lib/dovecot/expire-tool
      #expire = Trash 7 Spam 30
      #expire_dict = proxy::expire

      # Lazy expunge plugin. Currently works only with maildirs. When a user
      # expunges mails, the mails are moved to a mailbox in another namespace
      # (1st). When a mailbox is deleted, the mailbox is moved to another namespace
      # (2nd) as well. Also if the deleted mailbox had any expunged messages,
      # they're moved to a 3rd namespace. The mails won't be counted in quota,
      # and they're not deleted automatically (use a cronjob or something).
      #lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/

      # Events to log. Also available: flag_change append
      #mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
      # Group events within a transaction to one line.
      #mail_log_group_events = no
      # Available fields: uid, box, msgid, from, subject, size, vsize, flags
      # size and vsize are available only for expunge and copy events.
      #mail_log_fields = uid box msgid size

      # Sieve plugin (http://wiki.dovecot.org/LDA/Sieve) and ManageSieve service
      #
      # Location of the active script. When ManageSieve is used this is actually
      # a symlink pointing to the active script in the sieve storage directory.
      #sieve=~/.dovecot.sieve
      #
      # The path to the directory where the personal Sieve scripts are stored. For
      # ManageSieve this is where the uploaded scripts are stored.
      #sieve_dir=~/sieve
    }