LinuxCommandLibrary

clamconf

Display ClamAV configuration

SYNOPSIS

clamconf [OPTION...]

PARAMETERS

-h, --help
    Display a concise help message and exit.

-V, --version
    Print the ClamAV version number and exit.

-n, --no-summary
    Suppress printing the ClamAV build information summary at the beginning of the output. This focuses the output solely on configuration details.

-g, --gen-hostid
    Generate a new unique host ID and print it to standard output. This operation does not persist the ID to any configuration file.

-l, --list-configs
    List all discovered configuration files and their types (e.g., clamd.conf, freshclam.conf), along with their paths, without parsing their content.

DESCRIPTION

clamconf is a utility included with the ClamAV antivirus engine. Its primary purpose is to display the current ClamAV configuration information, including details about the build, various configuration files (e.g., clamd.conf, freshclam.conf) it discovers, and their parsed contents.

This tool is invaluable for troubleshooting ClamAV installations, verifying daemon settings, and debugging issues related to incorrect configurations. It can also generate a host ID for unique system identification, though it doesn't save it by default. The output can be comprehensive, making it easy to see all active settings at a glance, which is particularly useful in environments where multiple configuration files might exist or settings are inherited from different locations.

CAVEATS

clamconf reports on the configuration files it finds in standard locations. If configuration files are located in non-standard paths, clamconf might not include them in its output unless symlinked or explicitly configured in its own search paths (which is rare for clamconf itself).

The --gen-hostid option only generates and prints a host ID; it does not automatically save it to any configuration file. This usually needs to be done manually by editing clamd.conf if required.

CONFIGURATION FILE SEARCH ORDER

clamconf typically searches for configuration files (clamd.conf, freshclam.conf, etc.) in a predefined set of directories, often including /etc/clamav/, /usr/local/etc/clamav/, and sometimes paths relative to the ClamAV installation. The exact order and locations can vary slightly depending on the system and how ClamAV was installed.

OUTPUT STRUCTURE

The output of clamconf usually starts with a build summary (unless -n is used), followed by sections for each discovered configuration file. Each section lists the file path and then key-value pairs of the configuration directives parsed from that file. This structured output is designed to be easily readable for quick diagnosis of ClamAV settings.

HISTORY

clamconf has been a part of the ClamAV suite for a considerable time, evolving alongside the core antivirus engine. Its primary function has remained consistent: to provide an insight into the running or default configurations of ClamAV components, simplifying the debugging and auditing process for administrators. Its development reflects the increasing complexity of ClamAV deployments and the need for clear diagnostic tools.

SEE ALSO

clamd(8), freshclam(1), clamscan(1), sigtool(1)

Copied to clipboard