Usage information

To start the milter first you must create a configuration file with a very simple format: each line contains a different SURBL to check. See the included uri-milter.conf for a functional example. This configuration file and the socket address to listen to must be passed as command-line arguments to uri-milter.

Some more options are available which are described at the built-in help message:

./uri-milter -p Socket-Addr -c Conf-File [-h] [-s Subject-Tag] [-d] [-f] [-j]

  -p    Listen to the inet/unix socket defined as Socket-Addr
  -c    Read one SURBL from each line ine Conf-File
  -h    Help, a.k.a. this message
  -s    For each SURBL-positive mail, prepend Subject-Tag to email subject
  -d    Debug mode, currently only more verbose output to syslog
  -f    Foreground mode, do not daemonize
  -j    Reject each SURBL-positive email with a 550-5.7.1 reply

Finally, here are some examples of using URI-milter:

./uri-milter -c /etc/uri-milter.conf -p unix:/var/run/milter/uri-milter.socket
./uri-milter -c /etc/uri-milter.conf -p inet:1234@host.domain -s "[SPAM] "

Of course you should make sure that sendmail is configured properly, usually that means that you need two extra lines in the sendmail.cf, for example:

  O InputMailFilters=URI-milter
  XURI-milter, S=unix:/var/run/milter/uri-milter.socket, T=C:10s;R:1m;E:5m
or one line in sendmail.mc:
  INPUT_MAIL_FILTER('URI-milter', 'S=unix:/var/run/milter/uri-milter.socket, T=C:10s;R:1m;E:5m')