To whom might be concern:
I have a question about using procmail. I tried to write a ".procmailrc"
to forward a mail from an address to another address by reading the delivered
address in the content of the coming mail.
(My propose:
-Receive mail from A
-Forward to B by reading the address in the content of mail A
)
My '.procmailrc' file as the following:
* where is $SENDMAIL is sendmail
-----------------------------------------
* !^X-Loop:. ksomsama(_at_)cs(_dot_)uml(_dot_)edu
* !^FROM_DAEMON
* ^Subject:.*test
{
MAILDIR=$HOME/Mail
:0 bc
. # To save the current mail
:0 bc
|cat > newmail # To save to temporary file name 'new'
# which will be used by 'myprogram' to generate
# two file which are 'report' and 'address'
:0 bc # Generate the two files 'report' and 'address'
| perl myprogram; ADDRESS = | cat address
:0 hf
|(formail -rt; cat report) | $SENDMAIL -oi $ADDRESS
}
It works only generate the 'report' and 'address' files. But I don't know
how to forward the mail which have a content in the 'report' file to the
specific address in 'address' file.
Could you please help me to solve this problem!
Thank you,
Morn K. Somsaman.