• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

JmakefileH A D09-Apr-20201.3 KiB4639

Makefile.SHH A D03-May-20225.8 KiB236140

READMEH A D09-Apr-20202.1 KiB4132

dup2.cH A D09-Apr-20201.9 KiB8637

environ.cH A D09-Apr-20206.9 KiB259163

environ.hH A D09-Apr-20201.5 KiB4510

getopt.cH A D09-Apr-20203.3 KiB14367

hash.cH A D09-Apr-202010.4 KiB394242

hash.hH A D09-Apr-20201.9 KiB5720

io.cH A D03-May-202240.5 KiB1,398840

io.hH A D09-Apr-20201.1 KiB427

lock.cH A D09-Apr-20205.9 KiB236122

lock.hH A D09-Apr-20201.6 KiB5512

logfile.cH A D03-May-20227.5 KiB291172

logfile.hH A D09-Apr-20201.4 KiB4811

main.cH A D09-Apr-20206.9 KiB258145

misc.cH A D09-Apr-20203.1 KiB14373

msg.cH A D09-Apr-20204.1 KiB14748

msg.hH A D09-Apr-20201 KiB405

parser.cH A D09-Apr-202025.2 KiB847531

parser.hH A D09-Apr-20202 KiB6513

portable.hH A D09-Apr-20201.5 KiB5617

sysexits.hH A D09-Apr-20201.3 KiB4411

user.cH A D09-Apr-20201.8 KiB6824

README

1This is the root directory for the C filter.
2
3Using the C version of the filter instead of the shell version is up to you.
4This is not really a filter in the common sense, because it does not actually
5filter anything based on the contents of your mails. It only distills your
6incoming mail into the mailagent's queue, avoiding the spawning of multiple
7perl processes which are resource consuming.
8
9I had to write a C version for the filter because I was loosing some mail on
10my machine when I used the shell script. This occurred seldom, but still...
11The reason was due to the delivery mode at our site. We get our mail from a
12uucp feed. Once in a while, 20 or more mails were delivered at the same time,
13and the shell script was not fast enough, and sendmail + filter were eating
14all my system's resources.
15
16This program was written in two days, in self defense, when I decided I could
17not afford seeing my precious mail sweeping into /dev/null any longer. It
18might not be as portable as I wanted it too.
19
20If you have an internet connection and receive only a small amount of mail
21at a time, or if you have NFS mounted mailboxes, then the shell script filter
22may well be the winner.
23
24In case you are lucky enough to have a uucp connection *and* NFS mounted
25mailboxes where you may receive mail on multiple machines :-), then you may
26run into difficulties while setting up your .forward. The best thing to do is
27to have the filter executable installed at the same location on all the
28machines, say in /usr/local/bin/filter.
29
30If your sendmail does not always set the uid correctly before invoking the
31mailer specified in the .forward, then you will have to use the C filter and
32make a local copy with the setuid bit set. This is yet another reason for me
33to use this program on my MIPS workstation, grrr...
34
35The C filter pays attention to more variables in the ~/.mailagent than the
36shell script one, mainly to ensure a proper PATH variable. Also note that
37the algorithms used by the two programs are completely different. Despite the
38fact it was written in a hurry, I believe it is a little safer than its shell
39counterpart. At least it is *much* faster.
40
41