On Tue, 29 Dec 1998 15:23:59 -0700, Sotero Carlos-O10006
<Carlos(_dot_)Sotero(_at_)motorola(_dot_)com> wrote:
And of course, you can always do the standard formail -rD thing to
never respond more than once to the same address.
I tried the formail -rD thing once I saw that in a vacation
example. However I have not been able to get it to work.
How can you implement it in the following recipe?
I've added it here, between quoted parts of your original recipe.
I have removed some parts of it, too.
# auto-reply receipe for forged spam issue
# replies with text in file and saves complaint to folder
:0BHD #grep body and headers, D means case sensitivety
* INTERNATIONAL DRIVER'S LICENSE|UNIVERSITY DEGREE PROGRAMS
{
# If we have already replied to this correspondent,
# don't send the autoreply
:0Whc:vacation.lock
# You will get errors in procmail's log from this recipe
# each time formail detects a cache miss
* !^FROM_DAEMON
* !^X-Loop: postmaster(_at_)mot\(_dot_)com
| formail -rD 8192 vacation.cache
:0ehc
| (formail -rt -A "X-Loop: postmaster(_at_)mot(_dot_)com" \
-I "Precedence: junk" ; \
cat $MAILDIR/forgeresponse.txt ) | $SENDMAIL $SENDMAILFLAGS -t
:0:
postmaster-spam-complaint
}
The logic of the cache thing is briefly explained in the FAQ, as you
probably know already. The only additional remark I'd like to make is
to point out the meaning of the e flag -- it means, if the previous
condition matched, and the action was taken, but it failed, run this
recipe instead. (You end up making two clones, it might be more
efficient to code it with :0c: postmaster-spam-complaint first, then
the other two without c flags.)
Hope this helps,
/* era */
--
.obBotBait: It shouldn't even matter whether <http://www.iki.fi/~era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>