procmail
[Top] [All Lists]

Re: I need procmail to "bounce" a message to the sender

1996-05-29 02:15:36
Thanks for your advice Philip.  

I've now set up procmail on another machine where I have root
access.  The standard .forward works fine, and the bounce recipe
also, but I have two further problems:

1. The bounced message contains:

-------------------
   ----- The following addresses had delivery problems -----
"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #SACHA"  
(unrecoverable error)
    (expanded from: 
<sacha(_at_)mai(_dot_)hyg(_dot_)med(_dot_)kyoto-u(_dot_)ac(_dot_)jp>)

   ----- Transcript of session follows -----
550 "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #SACHA"... User 
unknown

   ----- Original message follows -----
-------------------

Is there any way of not including this in the bounced message?

2. Another funny thing is that procmail is writing "Please check
   the address and try again" (without the quotes) to a file
   named 2 inside MAILDIR.

My .procmailrc looks like:

-------------------
#VERBOSE=on
# remove any paths that are not reachable.
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/Inboxes
DEFAULT= $MAILDIR/Personal/unknown.mail
LOGFILE=$HOME/.mail-log

:0
* ^TO.*sacha
* ^X-Bounce-test:
* !^FROM_DAEMON
{
:0 c:
Hide/junk
# EX_UNAVAILABLE = 69
# EX_NOUSER = 67
EXITCODE = 67
:0 ih
|echo "Please check the address and try again" >&2
}
-------------

After two tests, my LOGFILE contains

-------------------
From sacha(_at_)kurims(_dot_)kyoto-u(_dot_)ac(_dot_)jp  Wed May 29 17:42:10 
1996
 Subject: test bounce
  Folder: echo "Please check the address and try again" >&2                 793
From sacha(_at_)kurims(_dot_)kyoto-u(_dot_)ac(_dot_)jp  Wed May 29 17:58:25 
1996
 Subject: bounce test 2
  Folder: echo "Please check the address and try again" >&2                 795
2: File exists.
-------------------

This looks like a problem with the output redirection, but I'm
not knowledgeable enough about sh/csh/tcsh to know what.

Sacha