1sagator(1) SAGATOR sagator(1)
2
3
4
6 sgfilter - scan something for viruses/spams over sagator's filterd()
7 service
8
10 sgfilter [--help] [--host hostname] [--port number] [--codes|-c]
11 [--non-safe|-x] [filename]
12
14 This command is a part of sagator. It can be used to scan emails for
15 viruses/spams. It is usable for example for courier smtpd, but can be
16 used also for procmail or other configurations.
17
19 --help Display a short help text.
20
21 --host hostname
22 Define a hostname of sagator's filterd() service.
23
24 --port number
25 Define a port of sagator's filterd() service.
26
27 --codes -c
28 Just check if the message is spam or not. Set exit code to 1, if
29 message is a spam, 0 if not a spam or processing failure.
30
31 --non-safe -x
32 Turn off "safe fallback" error recovery, which passes through if
33 an error occurs. Non safe processing returns an error code
34 described in "RETURN CODES" section.
35
36 filename
37 Name of the file to open. If it is not defined, standard input
38 is used.
39
41 0 Scanned email is clean (no virus and no spam has been found)
42
43 1 Scanned email is infected (virus or spam has been detected).
44 Just error codes (--codes) option must be turned on to return
45 this status.
46
47 64 An internal error occurred during scanning. Non safe processing
48 must be turned on to return this status.
49
50 65 An error with communication to sgfilterd() service (service is
51 not running?) Non safe processing must be turned on to return
52 this status.
53
55 An procmailrc filter:
56 # filter through sagator
57 :0fw
58 |sgfilter
59 # move identified emails to quarantine
60 :0
61 * ^X-Sagator-Status: .
62 $HOME/mail/quarantine
63
64 An courier filter:
65 xfilter "/usr/bin/sgfilter --host localhost --port 27"
66
68 Jan ONDREJ (SAL) <ondrejj (at) salstar.sk>
69
71 sgscan(1), sagator(8), sqback(8)
72
73
74
75version 0.1 December 20, 2004 sagator(1)