procmail
[Top] [All Lists]

Re: Possible procmail filter to trap spam relays?

1998-06-09 05:22:53
Walter Dnes <waltdnes(_at_)interlog(_dot_)com> writes:
...
While I'm at it, I'd like to have an efficiency
question answered.  Which of the following methods of inserting
an "X-Reject:" header takes fewer system resources?  Is it...

:0:
* blah blah blah
| echo "X-Reject: blah blah blah">>junkmail ;cat - >>junkmail

...or is it...

:0:
* blah blah blah
| formail -A "X-Reject: blah blah blah" >>junkmail

It probably doesn't matter -- they both shove the entire message
through a program.  However the latter puts the header in the right
place.  I suppose the following might be slightly better for large
messages:

        :0
        * blah blah blah
        {
            LOCKFILE = junkmail.lock
            :0 ch
            | formail -A"X-Reject: blah blah blah" >>junkmail
            :0 b
            junkmail
        }


The formail variant looks more elegant.  However, I'm always
thinking of resources.  The other question is whether every
installation that has procmail has formail.  I want this to
be a generic filter that as many people as possible can use.

formail comes with procmail, as is installed at the same time.


Philip Guenther