procmail
[Top] [All Lists]

Re: Is the use of EXITCODE in procmail recipe totally functional?

1997-02-20 23:53:50
Hello, everyone.

Well...  I have read all of the appropriate man pages about procmail,
and I have even searched through the procmail list archives for
answers/solutions to my problem.  In other words, I have "RTFM" :)...

Despite all of this effort, it seems that I have not been able to
create a procmail recipe (in .procmailrc) that will bounce messages
sent from certain perpetrators, with an error message, as per an
exitcode setting, e.g. 67 or 77.

I got some clues from some recent postings to this list, regarding the
.forward file (and its syntax).  Currently, my .forward file says:  

"|IFS=' ' ;exec /usr/local/bin/procmail #debraw"

Here's your problem -- you need to tell `procmail` to exit softly (and
I'd add the "Y" argument [Berkeley-style mail] also).  Something that
should work in your case would be a "~/.forward" like this:

"|IFS=' ' ;exec /usr/local/bin/procmail -Yf- #debraw"

[snip]

The procmail recipe that I am testing, for this purpose, is:

:0
* ^From.*juno.com
{
   EXITCODE=67

   :0
   /dev/null
}

I do not want to permanently "deep-six" email from Juno.  I have a Juno
account, along with this one.  All I want to do is see if the recipe
works completely, i.e. assigning exitcode, sending a bounce-type
message (according to exitcode value) to Juno, and directing any email from
Juno to /dev/null.

That above recipe looks fine.  Try it with the "new and improved"
"~/.forward" file.

[snip]

All I want to know is (1) where am I going wrong here, and (2) what can
I do to solve this problem.  I would like to use exitcodes in procmail
to send particular messages to email abusers.   And, as I understand it,
the inclusion of certain exitcodes in a procmail recipe, i.e. 67 and/or
77, are supposed to do the trick.

Can anyone assist me?

Try the above suggestion :^)

Lates!
---------------------------------------------------------------------------
Tim <bodysurf(_at_)pobox(_dot_)com>                          
mailto:bodysurf(_at_)pobox(_dot_)com
Finger bodysurf(_at_)pobox(_dot_)com for my PGP public key (Bits 1024/KeyID 
09DA5C49).
PGP Key FPrint (09/03/94): 4C 97 F1 FA 70 55 68 91  49 D1 AD F2 DD 63 0C 15
---------------------> Please PGP encrypt your email <---------------------

<Prev in Thread] Current Thread [Next in Thread>