           ----------------------------------------------
            noattach - an attachment filter for sendmail
           ----------------------------------------------

There really isn't much to say, noattach is a milter that parses the body
of email messages from sendmail and checks if the filename of attachments
matches one of the regular expressions in a given pattern file and rejects
those emails that match.
Filenames are rfc2047 or rfc2231 decoded if needed.


This program needs sendmail version 8.12.2 or newer to be compiled with
libmilter.
If you have sendmail 8.12.2 you should patch it with the milter.c.patch
from the patches directory, this is an official patch from sendmail and
is not needed for sendmail 8.12.3.

I assume that you have installed your sendmail libs in /usr/local/lib and
the header files in /usr/local/include, if this is incorrect you need to
set the CPPFLAGS and LDFLAGS correctly.
If you are on Solaris 8 and your sendmail source is in
/usr/local/sendmail-8.12.3 your CPPFLAGS and LDFLAGS might look something
like this:

CPPFLAGS="-I/usr/local/src/sendmail-8.12.3/include" \
LDFLAGS="-L/usr/local/src/sendmail-8.12.3/obj.SunOS.5.8.sun4/libmilter"


Check the file INSTALL for basic compile and installation instructions.

Usage:

noattach accepts the following parameters:

-h             Usage information
-n             Stay in the foreground, i.e. don't fork into the background.
-p <portinfo>  The port to listen to

Examples:
  noattach -p inet:26@localhost  (Listen to ipv4 port 26 on localhost)
  noattach -p local:/var/run/f1.sock (Listen on a unix socket)


Filters can then be specified in your sendmail .mc file using the following:

INPUT_MAIL_FILTER(`filter1', `S=local:/var/run/noattach.sock, F=T, T=C:2m')
INPUT_MAIL_FILTER(`filter2', `S=inet6:26@localhost, F=T, T=C:2m')
INPUT_MAIL_FILTER(`filter3', `S=inet:26@localhost', F=T, T=C:2m)

Read more about the parameters for INPUT_MAIL_FILTER in README.libmilter


In the examples/ dir you can find example pattern files wich has some sample
regular expressions, check out the examples/README for more info.

If you ever change the pattern file you don't need to restart the server, just
send it a SIGUSR1 signal(3) and it will reload the patterns.


I don't guarantee that noattach runs on any system, if you can compile and
run it on other systems than listed below please let me know.

noattach is known to work on:

* FreeBSD 4.*
* Solaris 2.6
* Solaris 8
* SuSE Linux 7.1


New versions of this program will be distributed from
ftp://ftp.rhnet.is/pub/noattach


Any patches or questions to oli@isnic.is

