procmail
[Top] [All Lists]

create official looking rejection message

2001-08-06 09:33:46
On 8 Mar 2001 Philip Guenther (guenther(_at_)gac(_dot_)edu) wrote:

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


I also would like some code to generate a bounce message like
Philip describes above. I've been experimenting with using exit
codes and on a qmail system `exit 100' produces a nice concise
reject message which includes the headers of the rejected message
and not the body. On sendmail systems, exitcode 67 or 77 do two
things I don't like

1] send back the entire rejected message thus wasting bandwidth
2] send back my .forward file contents

Any tips or suggestions for producing a concise legitimate reject
message on a sendmail system are welcome.

Thank you,
Nancy
posted & cc'd


REFERENCE:
The message I'm replying to -- and this entire thread & group --
may be available at

 <http://www.xray.mpe.mpg.de/mailing-lists/procmail/2001-03/msg00119.html>

-- 
ii Procmail QStart: <http://www.ii.com/internet/robots/procmail/qs/>

Nancy McGough            <http://www.ii.com>            Infinite Ink
= Sent via Pine 4.39.999: IMAP, NNTP & ESMTP for Unix/Win/Mac OS X =

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