Giuseppe Giglio <mc8885(_at_)mclink(_dot_)it> writes:
...
Now I have this setup of .procmailrc :
...
:0
* ^TOinfo
*!^FROM_DAEMON
*!^X-Loop: info(_at_)giglio(_dot_)com
|(formail -r -a "Precedence: junk"\
-I"From: Auto Replay from giglio.com " \
-I"Subject: Received email" \
-A "X-Loop: info(_at_)giglio(_dot_)com";\
cat $FILEDIR/info.txt ) |$SENDMAIL -t
:0
* ^TO.*
! mc8885(_at_)mclink(_dot_)it
*****cut here *********
and this results :
- messages mailed to giuseppe are forwarded correctly.
- messages mailed to federico are forwarded correctly.
- who send messages to info, receive correctly the autoreplay,
but I LOSS THE ORIGINAL MESSAGE (it doesn't forwarded neither left on pop
of server)
- all other messages mailed to anythingelse(_at_)giglio(_dot_)com are
forwarded correctly
According with the log file, I think that procmail when receive a mail to info
it found :
- No Match for (1st condition)
- No Match for (second condition)
- Match on (3rd condition) so it process the mail sending the autoreplay.
AND AFTER ??? what about the original mail ?
The log file finish here non considering the last (^TO.* )condition.
To quote the procmailrc(5) manpage:
There are two kinds of recipes: delivering and non-
delivering recipes. If a delivering recipe is found to
match, procmail considers the mail (you guessed it)
delivered and will *cease*processing* the rcfile after having
successfully executed the action line of the recipe. ...
Delivering recipes are those that cause header and/or body
of the mail to be: written into a file, absorbed by a pro-
gram or forwarded to a mailaddress.
Since the autoreply recipe does the middle of those (absorbed by a
program), it is a delivering recipe and procmail ceases. That's not
what you want, so we read a little farther in the manpage and see:
You can tell procmail to treat a delivering recipe as if it
were a non-delivering recipe by specifying the `c' flag on
such a recipe. This will make procmail generate a carbon
copy of the mail by delivering it to this recipe, yet con-
tinue processing the rcfile.
Does that make sense? Do you see what to do?
Philip Guenther