procmail
[Top] [All Lists]

Re: Nicer Error Message

2001-03-08 02:37:16
Chen Shiyuan <csy(_at_)hjc(_dot_)edu(_dot_)sg> writes:
To turn it around: you can have procmail redirect or capture most of
that output, but you need to figure out what to do with what you've
got. What you can't change without changing the source to sendmail and 
procmail is eveything above the "Transcript of session follows" line, 
and the exact text at the bottom (sendmail generates that based on 
procmail's exitcode, so there's only a limited set and they have 
fairly precise and standard meaning that you don't want to mess with).

I see. But can I make it such that procmail returns a "normal" exitcode 
to sendmail and at the same time just throw back a generic message to 
the sender telling him that there were some problems with the email?

You could generate your own error/bounce message and have procmail return
success to sendmail.

Hmm, does anyone out there have a nice snippet of code (be it rcfile,
another scripting language, or some combination) that generates a bounce
message?  Note that it *must* set the envelope sender to <> and should
probably submit it via SMTP (my memory is that submission of such message
via the command line doesn't always work).  Bonus points for generating
it in DSN format (see RFCs 1892 and 1894).  Either it or the rcfile
using it *must* simply toss the message if the incoming message has an
envelope sender of <>.

Anyone have something like that?


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