sgfilter man page

sgfilter — scan something for viruses/spams over sagator's filterd() service

Synopsis

sgfilter [--help] [--host hostname] [--port number] [--codes|-c] [--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

0
Scanned email is clean (no virus and no spam has been found)
1
Scanned email is infected (virus or spam has been detected). Just error codes (--codes) option must be turned on to return this status.
64
An internal error occurred during scanning. Non safe processing must be turned on to return this status.
65
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"

Author

Jan ONDREJ (SAL) <ondrejj (at) salstar.sk>

See Also

sgscan(1), sagator(8), sqback(8)

Referenced By

sagator(8), sgscan(1), sqback(8).

December 20, 2004 version 0.1 SAGATOR