procmail
[Top] [All Lists]

procmail form /etc/aliases

1996-09-10 23:29:10
Hello,
        I am fairly new to procmail. I have succeeded in setting up a 
small auto file-retrieve function using procmail. Everything works fine 
there. 

Now, I do not want to create user accounts for every email address so I 
can use procmail to process it. So I decided to take my working script 
and use it where its called directly from /etc/aliases as 
testing-mailbot:"|/usr/local/bin/procmail /zen1/info/procmail"

The file /zen1/info/procmail is so:

:0 c
* !^X-Loop: bne(_at_)www(_dot_)planetmedia(_dot_)com
* !^Subject:.*Re:
* !^FROM_DAEMON
* ^Subject:.*send
{
MAILDIR=/zen1/info # chdir to the fileserver directory
 
:0 h # extract the requested filename(s)
FILES=| sed -n -e 's/^Subject:.*send \(.*\)/\1/p'
 
:0 f # reverse the mailheader
| formail -rA "X-Loop: bne(_at_)www(_dot_)planetmedia(_dot_)com"
 
:0
| (cat; cat $FILES) | $SENDMAIL -oi -t
 
}


The above does not quite work.
Is there any example I can look at to make procmail work directly 
from /etc/aliases? 
I know I am close to a solution because the file I am requesting 
does return but from postmaster and before that I get an error 
message also.

So, on the client machine I get:

   ----- The following addresses had delivery problems -----
"|/usr/local/bin/procmail /zen1/info/procmail"   (unrecoverable error)
    (expanded from: <testing-mailbot(_at_)baynestudio(_dot_)com>)
 
   ----- Transcript of session follows -----
procmail: Couldn't create "/var/mail/998"
550 "|/usr/local/bin/procmail /zen1/info/procmail" ... Can't create output: 
Error 0

and I also get the message that has the file I want.

On the server machine the postmaster gets the following message:

To: postmaster(_at_)baynestudio(_dot_)com
Subject: Returned mail: Who are you?: No such file or directory
 
The original message was received at Tue, 10 Sep 1996 18:24:14 -0700
from Unknown UID 998(_at_)localhost
 
   ----- Transcript of session follows -----
554 Who are you?: No such file or directory


Any help, RTFM pointers, examples appreciated.
I am not subscribed to the list, so a CC to me would be 
appreciated.

bne   

<Prev in Thread] Current Thread [Next in Thread>