I created the following recipe:
:0 c
| (formail -A "" ;\
echo "From: Info" ;\
echo "You have new mail!" ) | $SENDMAIL my2nd(_dot_)address(_at_)domain(_dot_)hu
The rule of it to send me a mail to my 2nd. address in order to inform me
I got a mail to my 1st. address, and make a copy of the mail for my 1st
address as well.
Thi mail looks like:
To:my2nd(_dot_)address(_at_)domain(_dot_)hu
From: Info(_at_)domain(_dot_)hu
Subjetc:
You have new mail!
The problem, that I can not "save" the From field of the original mail,
because formail changes the sender to
my1st(_dot_)address(_at_)domain(_dot_)hu(_dot_) That is
what I inserted the "echo 'From: Info" ;\' line because in this case I
will see Info(_at_)domain(_dot_)hu as a sender. What shold I do the see the
original
sender?
May be it is not the best solution for this problem. For example I
created other recipe as well:
:0 c
{
:0 Bbf
* > 1
|grep -l
:0
! my2nd(_dot_)address(_at_)domain(_dot_)hu
}
This recipe saved the From and the Subject filed of the original mail,
but do not cut the body (inserts <stdin> to the body because of |grep -l)
and do not insert the "You have new mail!" line to the body.
I am not so experienced in procmail so any suggestion would be useful for
me!!
Thanks!
Udvozlettel:
Palotas Peter
StarKing Obuda Kft.
Apple Center
tel.:(36-1) 436-1111
fax :(36-1) 436-1119