procmail
[Top] [All Lists]

Re: create official looking rejection message

2001-08-06 11:14:45
* Nancy McGough <nm-this-address-is-valid(_at_)no(_dot_)sp(_dot_)am> [010806 
12:28]:

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.

A friend & I were working on a bounce recipe today.  He wasn't satisfied
w/ what qmail did w/ EXITCODE=100.  So we did something along the lines
of this. (I'm trusting my memory here, *shudder*)

# grab headers
:0h
* conditions
HEADERS=|formail -rI "X-Loop: me(_at_)some(_dot_)addr"

# generate our autoreply
:0abw
| (echo "$HEADERS"; \
   echo "You've been rejected!"; \
   echo ; \
   echo "Here's your original message:"; \
   cat -) | $SENDMAIL $SENDMAILFLAGS -t

-- 
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
        
Grief in the heart of a man shall
bring him low, but with a good word
he shall be made glad.
   -- Proverbs 12:24
--
_______________________________________________
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>