procmail
[Top] [All Lists]

bounces and +suffixes

2000-06-19 17:27:05
Two questions.

I have a recipe
:0
* ^Subject:.*mash this
|/home/kragen/bin/mash

mash is a Perl script which executes the contents of the email as a
shell script (given correct one-time passwords in the email).  Various
things can go wrong in mash: full disk, can't fork, etc.  In these
cases, I would like procmail to exit with code 70 or something similar,
causing sendmail to bounce the mail.

My current solution is to spawn a new sendmail process, fashion a
bounce message, and pass it to that sendmail process.  This is
unsatisfactory; most of the error conditions will prevent this from
working correctly.

I could do something like kill(getppid(), 3), but this also seems
unsatisfactory, because it is very procmail-dependent (and I am not
sure it will actually work --- if procmail spawns sh -c
/home/kragen/bin/mash, I'd uselessly kill the shell instead.)

Is there a way to do this?  I have searched the manual, FAQ, and list
archives, and I have seen methods of causing procmail to exit with a
particular exit code from within a recipe, but not from within a piped
command.


My other question is related: sendmail happily delivers mail to
kragen+garbage or kragen+walnuts using my .forward file, invoking
procmail.  However, it doesn't seem that "garbage" or "walnuts" gets
passed to procmail.  Is there a way to get that information, short of
installing procmail as the local MDA?  I control the sendmail setup on
the site, but I'm reluctant to give procmail to people who don't want
it.

I care because I've been scarred by my previous experiences with
subject-line filtering, and I'd rather send email to kragen+mash than
email to kragen with subject "mash this".  Once the InterNIC gets off
their ass and fixes our ####ing NS records so our MX records point at
us instead of ####ing mydomain.com . . .  well, let me not get off on
that tangent.


To tell the truth, I'm so frustrated with all this crap that I'm on the
point of giving up and installing qmail, which would solve both
problems instantly.

-- 
<kragen(_at_)pobox(_dot_)com>       Kragen Sitaker     
<http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either.  :)


_______________________________________________
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>