Doveconf - command doveconf
¶
-
class
insights.parsers.doveconf.
Doveconf
(*args, **kwargs)[source]¶ Bases:
insights.core.ConfigParser
Class for parsing the
doveconf
command. Sample input:# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf auth_anonymous_username = anonymous auth_cache_negative_ttl = 1 hours auth_policy_request_attributes = login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} device_id=%{client_id} protocol=%s auth_policy_server_api_header = log_timestamp = "%b %d %H:%M:%S " login_access_sockets = namespace inbox { disabled = no location = mailbox Drafts { auto = no driver = special_use = \Drafts } mailbox Junk { auto = no } order = 0 prefix = subscriptions = yes } passdb { args = auth_verbose = default } service aggregator { chroot = . client_limit = 0 fifo_listener replication-notify-fifo { group = mode = 0600 } group = unix_listener replication-notify { mode = 0600 } user = $default_internal_user vsz_limit = 18446744073709551615 B } valid_chroot_dirs = verbose_proctitle = no
Example
>>> doveconf['auth_anonymous_username'].value 'anonymous' >>> doveconf['auth_cache_negative_ttl'].value '1 hours' >>> doveconf['auth_cache_size'].value '0' >>> doveconf['auth_policy_request_attributes'].value 'login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} device_id=%{client_id} protocol=%s' >>> doveconf['log_timestamp'].value '"%b %d %H:%M:%S "' >>> doveconf['namespace'][0].value 'inbox' >>> doveconf['namespace'][0]["mailbox"][1].value 'Junk'