sgfilter(1) - Linux man page
Name
sgfilter - scan something for viruses/spams over sagator's filterd() serviceSynopsis
sgfilter [--help] [--host hostname] [--port number] [--codes|-c] service [--non-safe|-x] [filename]Description
This command is a part of sagator. It can be used to scan emails for viruses/spams. It is usable for example for courier smtpd, but can be used also for procmail or other configurations.Options
- --help
- Display a short help text.
- --host hostname
- Define a hostname of sagator's filterd() service.
- --port number
- Define a port of sagator's filterd() service.
- --codes -c
- Just check if the message is spam or not. Set exit code to 1, if message is a spam, 0 if not a spam or processing failure.
- --non-safe -x
- Turn off "safe fallback" error recovery, which passes through if an error occurs. Non safe processing returns an error code described in "RETURN CODES" section.
- filename
- Name of the file to open. If it is not defined, standard input is used.
Return Codes
- Scanned email is clean (no virus and no spam has been found)
- Scanned email is infected (virus or spam has been detected). Just error codes (--codes) option must be turned on to return this status.
- An internal error occurred during scanning. Non safe processing must be turned on to return this status.
- An error with communication to sgfilterd() service (service is not running?) Non safe processing must be turned on to return this status.
Examples
- An procmailrc filter:
# filter through sagator :0fw |sgfilter # move identified emails to quarantine :0 * ^X-Sagator-Status: . $HOME/mail/quarantine
- An courier filter:
- xfilter "/usr/bin/sgfilter --host localhost --port 27"