procmail
[Top] [All Lists]

Re: EXITCODE = 67

2000-07-25 15:00:18
From: Eric Hilding <eric(_at_)hilding(_dot_)com>


I'm also trying to use EXITCODE=67 but it just doesn't
seem to work right.  Can anyone shed some light?

:0
^ TOexitest(_at_)hilding(_dot_)com
{
  EXITCODE = 67
}
/dev/null

PMLOG:
------
procmail: Skipped "TOexitest(_at_)hilding(_dot_)com"


I urge you to read "man procmailex", the Examples manpage.
Your recipes are not conforming to procmail syntax.

First, you are trying to build a condition: egrep for 
"exitest(_at_)hilding(_dot_)com" appearing anywhere within the ^TO
regexp (see man procmailrc).  For condition lines, using
postdeluvian (modern) syntax, you want to remember the
asterisk at the start of the condition line.

Second, you may not separate the caret (^) from the phrasal
TO in the procmail regex "^TO".  The three characters,
caret, T, and O, must stay abutted to have any special
meaning as was intended for ^TO to have.

Third, a procmail recipe may have one action-line.  You
have two - the EXITCODE assignment and the indended
destination, /dev/null.  This will not work.

Fourth, just an FYI, though probably not critical to
the recipe's working as you would expect it to - but
the dot in the address on the condition line means to
procmail "any single character (that is not a line-end or
carriage return)", not necessarily only a period.  You
want to quote the dot with a backslash if you are concerned
about limiting the match to an actual dot.  Again, this is,
in practical terms, not likely to matter, but we might
as well represent what we are doing accurately as opposed
to muddily.

Fifth, EXITCODE from the MDA (procmail) may or may not
be recognized by your MTA (e.g., sendmail) such that
the MTA would do anything about it.  On one system of
mine, I can't successfully feed an EXITCODE back to
the MTA.  You'd have to experiment with a *working*
recipe (as opposed to a broken one) to see if your system
has that limitation.


  Folder: ^

That's because you separated the caret, and because you didn't
precede it with an asterisk, so procmail assumes it is an
action line and not a condition line; and that ^ is the name
of the mail folder to which you want to save.


There are good procmail FAQs pointed to frequently on this list
(links to some are found at www.procmail.org).  Suggest you
start at the beginning.  Make a completely simple recipe that
actually *works* and does what you expect it to.  Then build
from there.  When you get in trouble and have read the basic
man pages and applied analogous recipe syntax, but are still
confusing, then come here and ask, sure!  But it's frustrating
to many or most here to explain things that one would hope
would be seen by the most cursory glance through man procmailex
and man procmailrc.  IMHO, of course.

Try this:

 :0
 * ^TOexitest(_at_)hilding\(_dot_)com
 {
   EXITCODE = 67
 }

I don't think you should need the /dev/null after that
anyway (if EXITCODE works).  But if you do:

 :0
 * ^TOexitest(_at_)hilding\(_dot_)com
 {
   EXITCODE = 67

   :0
   /dev/null
 }


-- 
    \     .-.     .-.     .-.     .-.     .-.     .-.     .-.     /
     \-d-/-m-\-a-/-n-\-(_at_)-/-n-\-e-/-t-\-c-/-o-\-m-/-.-\-c-/-o-\-m-/
      '-'     '-'     '-'     '-'     '-'     '-'     '-'     '-'

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: EXITCODE = 67, Dallman Ross <=