bmf-milter

bmf filter milter daemon
git clone git://r-36.net/bmf-milter
Log | Files | Refs | README | LICENSE

bmf-milter.8 (3400B)


      1 .Dd June 14, 2020
      2 .Dt BMF-MILTER 8
      3 .Os
      4 .
      5 .Sh NAME
      6 .Nm bmf-milter
      7 .Nd a milter daemon for bmf filtering
      8 .
      9 .Sh SYNOPSIS
     10 .Nm
     11 .Bk -words
     12 .Op Fl d
     13 .Op Fl b Ar bmfdb
     14 .Op Fl c Ar conndef 
     15 .Op Fl f Ar bmfpath
     16 .Op Fl g Ar group
     17 .Op Fl t Ar timeout
     18 .Op Fl u Ar user
     19 .Op Fl v Ar dbglevel
     20 .Ek
     21 .
     22 .Sh DESCRIPTION
     23 .Bd -filled
     24 .Nm
     25 is a daemon to be used with
     26 .Em postfix,
     27 .Em sendmail
     28 or anything providing a milter interface.
     29 The daemon is run on unix socket, a fifo pipe or a tcp port, which
     30 .Em postfix
     31 or
     32 .Em sendmail
     33 connect to, using the milter protocol.
     34 .Ed
     35 .
     36 .Sh OPTIONS
     37 .Nm
     38 options and default settings:
     39 .Bl -tag -width Ds
     40 .
     41 .It Fl d
     42 Do not fork into the background. By default
     43 .Nm
     44 forks into the background.
     45 .
     46 .It Fl b Ar bmfdb
     47 Specify the directory where the
     48 .Em bmf
     49 database is stored. See
     50 .Em bmf(1)
     51 for details. The default is to use
     52 .Em ~/.bmf
     53 in the home directory
     54 .Nm
     55 runs as.
     56 .
     57 .It Fl c Ar conndef
     58 Define the connection
     59 .Em libmilter
     60 should listen on (default: inet:9957). It can in in following forms.
     61 .Bd -literal
     62      {unix|local}:/path/to/file
     63      inet:port[@{hostname|ip}]
     64      inet6:port[@{hostname|ip}]
     65 .Ed
     66 .
     67 .It Fl f Ar bmfpth
     68 Specify the path to the
     69 .Em bmf
     70 binary. The default is
     71 .Em /usr/bin/bmf.
     72 .
     73 .It Fl g Ar group
     74 Sets the group to which privileges drop when
     75 .Nm
     76 is ready to accept network connections (default: group
     77 .Nm
     78 runs as).
     79 Helps improve security by reducing privileges during request
     80 processing.
     81 .
     82 .It Fl t Ar timeout
     83 Defines the timeout in seconds for requests. The default is the default
     84 compiled into
     85 .Em libmilter.
     86 .
     87 .It Fl u Ar user
     88 Sets the user to which privileges drop when
     89 .Nm
     90 is ready to accept network connections (default: user
     91 .Nm
     92 geomyidae runs as). Helps improve security by reducing
     93 privileges during request processing.
     94 .
     95 .It Fl v Ar loglevel
     96 Turn on debugging and set the debug level for
     97 .Em libmilter.
     98 The default is none. Libmilter accepts a maximum of six debug levels.
     99 .
    100 .El
    101 .
    102 .Sh BAYESIAN MAIL FILTER SETUP
    103 Please see
    104 .Em bmf(1)
    105 for how the Bayesian mail filter works and how to train it for
    106 spam and non-spam messages. Beware, that by default,
    107 .Em bmf
    108 will use the
    109 .Em~/.bmf
    110 directory of the user
    111 .Em bmf
    112 is running as. You can specify a different
    113 .Em user
    114 using the
    115 .Em -u
    116 flag. Another way is to specify a directory using the
    117 .Em -b
    118 flag.
    119 There is no need to do anything specific there,
    120 .Em bmf
    121 will create the appropriate files on its own.
    122 .Ed
    123 .
    124 .Sh MAIL FILTERING
    125 .Nm
    126 by default works in test mode of bmf and will apply two mail headers.
    127 Following header is added, when the e-mail was processed using the
    128 milter.
    129 .Bd -literal
    130 	X-BMF-Processed: YES
    131 
    132 .Ed
    133 When
    134 .Em bmf
    135 classified some e-mail as spam, following header is added.
    136 .Bd -literal
    137 	X-Spam-Flag: YES
    138 
    139 .Ed
    140 You can then apply your mail's filtering rules on those headers.
    141 .
    142 .Sh POSTIFX INTEGRATION
    143 In the
    144 .Em main.cf
    145 file adapt the following line to your local configuration.
    146 .Bd -literal
    147       smtpd_milters=inet:127.0.0.1:9957
    148 .Ed
    149 .
    150 .Sh SENDMAIL INTEGRATION
    151 In your
    152 .Em sendmail.mc
    153 adapt the following line to your needs.
    154 .Bd -literal
    155       INPUT_MAIL_FILTER(`bmf-milter', `S=inet:9957,F=T')dnl
    156 .Ed
    157 .
    158 .Sh SEE ALSO
    159 .Ic bmf(1),
    160 .Ic postconf(5),
    161 .Ic postfix(1),
    162 .Ic sendmail(1)
    163 .
    164 .Sh AUTHORS
    165 See the LICENSE file in the distribution for authors.
    166 .
    167 .Sh LICENSE
    168 See the LICENSE file for the terms of redstribution.
    169 .
    170 .Ss "Reporting Bugs"
    171 Report bugs to:
    172 .An "Christoph Lohmann" Aq 20h@r-36.net
    173