sgfilter man page

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


sgfilter [--help] [--host hostname] [--port number] [--codes|-c] [--non-safe|-x] [filename]


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.


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.
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.


An procmailrc filter:
# filter through sagator
# move identified emails to quarantine
* ^X-Sagator-Status: .
An courier filter:
xfilter "/usr/bin/sgfilter --host localhost --port 27"


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

See Also

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

Referenced By

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

Explore man page connections for sgfilter(1).

SAGATOR version 0.1 December 20, 2004