Hi everybody,
After reading manual pages for procmail, procmailex, procmailrc,
procmailsc, sendmail etc...
pages we have tried to create a recipe. What it does is, if someone sends
us a mail with the
word `cprofile' in the subject, first it would mail me at my new address,
second it should send
back the content of file `ctest' to the sender. If the word `cprofile' is
not found it would
simply forward the mail to my new address.
---- Recipe Starts Here ----
#a/h/a/haripati/.procmail/rc.testing
:0 c
* ^Subject:.*cprofile
! grenleaf(_at_)bom2(_dot_)vsnl(_dot_)net(_dot_)in
:0
* ^Subject:.*cprofile
| ( formail -r ; cat ctest ) | $SENDMAIL -oi -t
:0 E
! grenleaf(_at_)bom2(_dot_)vsnl(_dot_)net(_dot_)in
---- Recipe Ends Here ----
My Problem :
Now suppose we receive a mail with the word `cprofile' in subject field.
It successfully passes
the message to my new email address. But does not pass the content of the
file `ctest' to the
sender. Where are we going wrong. I have created `ctest' file in my $HOME
directory and also
inside the "$HOME/.procmail/"
Any help will be highly appreciated. Thank you all in advance.
My "log" files reads as follows :
---- Start of Log file -----
procmail: [19208] Wed Apr 2 13:26:50 1997
procmail: Assigning "INCLUDERC=/a/h/a/haripati/.procmail/rc.testing"
procmail: Match on "^Subject:.*cprofile"
procmail: [19208] Wed Apr 2 13:26:51 1997
procmail: Executing
"/usr/lib/sendmail,grenleaf(_at_)bom2(_dot_)vsnl(_dot_)net(_dot_)in"
procmail: [19208] Wed Apr 2 13:26:53 1997
procmail: Assigning "LASTFOLDER=/usr/lib/sendmail
grenleaf(_at_)bom2(_dot_)vsnl(_dot_)net(_dot_)in"
procmail: [19208] Wed Apr 2 13:26:54 1997
procmail: Match on "^Subject:.*cprofile"
procmail: [19208] Wed Apr 2 13:26:55 1997
procmail: Executing " ( formail -r ; cat ctest ) | $SENDMAIL -oi -t "
procmail: [19208] Wed Apr 2 13:26:56 1997
procmail: Assigning "LASTFOLDER= ( formail -r ; cat ctest ) | $SENDMAIL
-oi -t "
From haripati(_at_)cyberspace(_dot_)org Wed Apr 2 13:26:33 1997
Subject: Re: cprofile
Folder: ( formail -r ; cat ctest ) | $SENDMAIL -oi -t
582
cat: ctest: No such file or directory
procmail: [19208] Wed Apr 2 13:26:58 1997
procmail: Notified comsat: "haripati@: ( formail -r ; cat ctest ) |
$SENDMAIL -oi -t "
---- End of Log file -----