File: usage.cc

package info (click to toggle)
filtermail 1.06.00-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,688 kB
  • sloc: cpp: 2,487; fortran: 249; makefile: 106; ansic: 51; sh: 36
file content (80 lines) | stat: -rw-r--r-- 4,282 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//                     usage.cc

#include "main.ih"

namespace {
char const info[] = R"_( [options] base
Where:
    [options] - optional arguments (short options between parentheses):
        --accept [:HDRS:]path - path receiving accept-marked mail. If not
                                specified accept-marked mail is ignored (not
                                saved on file). Prepend :HDRS: to `path' to
                                merely write the received mail's From: and
                                Subject: headers to `path'.
        --cls <what>          - specify 'yes' (default) to clear the screen
                                before inspecting the e-mail. Otherwise 
                                (e.g., 'no') the screen is not cleared. This
                                option is only used when the --inspect option
                                is specified.
                                
        --config (-c) path    - the path to the configuration file.
                                (default: ~/.filtermail/config)
        --expire (-e) date    - inspect rule files for expired rules (no mail
                                 is read). Use format yy-mm-dd when specifying
                                 'date'. Rules having older date stamps are
                                 removed from their files and are stored in
                                 files having extension .exp
        --help (-h)            - provide this help
        --ignore [:HDRS:]path  - path receiving ignore-marked mail. If not
                                 specified ignore-marked mail is ignored. 
                                 Prepend :HDRS: to `path' to merely write the
                                 received mail's From: and Subject: headers to
                                 `path'.
        --inspect (-I)         - inspect the 'Received:' headers (see below).
        --interactive (-i)     - specified rules are interactively simulated 
                                 (no mail is read)
        --log (-l) spec        - specify the log-facility. By default logging
                                 is not used (see the default config file)
        --preamble             - verify that the basic options are correctly
                                 specified.
        --received (-R) spec   - if a Received: header contains 'spec' then
                                 only subsequent Received: headers are
                                 inspected. If not specified or if no
                                 Received: header contains 'spec' then all
                                 Received: headers are inspected. This option
                                 is only used when the --inspect option is
                                 specified.
        --rules (-r) path      - rules specification file 
                                 (default: ~/etc/mailfilter/rules)
        --spam [:HDRS:]path    - path receiving spam-marked mail. If not
                                 specified spam-marked mail is ignored.
                                 Prepend :HDRS: to `path' to merely write the
                                 received mail's From: and Subject: headers to
                                 `path'.
        --syntax               - only perform a syntax check of the filter 
                                 rules
        --version (-v)         - show version information and terminate
    
    base - absolute path to the user's home directory. When specified
                              other path specifications may start with
                              ~/, replacing ~ by --base's path

    Unless --expire or --interactive is specified mail is read from stdin. 
    
    When the --inspect option is specified the 'Received:' headers found in
    the e-mail are inspected. IP addresses found in those headers are passed
    to 'whois'. The header's content, the inspected IP address, its country
    and cidr-range are written to the std. output stream.

)_";

}

void usage(std::string const &progname)
{
    cout << "\n" <<
    progname << " by " << Icmbuild::author << "\n" <<
    progname << " V" << Icmbuild::version << " " << Icmbuild::years << "\n"
    "\n"
    "Usage: " << progname << info;
}