How to specify clamd’s IP address when using clamdscan

anti-virusclamav

I set up a separate host for clamd to handle virus-scanning, and I want to test it before putting it in production. Now, while MailScanner's configuration for remote clamd is clear and simple, I can't find any information on how to do that with clamdscan. Does anyone know?

Best Answer

Take a look at the clamdscan.py:

$ clamdscan.py -h
Usage: clamdscan.py [OPTIONS] file [file , file , ...]
    -h,--help                         Show this help
    -V,--version                      Show clamd version and exit
    --quiet                           Only output error messages
    --no-summary                      Disable the summary at the end of scanning
    --remove                          Remove the infected files. Be careful!
    -t HOST,--host=HOST               The clamd host to connect to
    -p PORT,--port=PORT               The port to connect to on the clamd host
    -u SOCKET,--unix-socket=SOCKET    Path to the unix socket to use.
                                      NOTE: This overrides any setting for host
                                            and port.