Hello folks,
It has been quite awhile since I last asked a question here.
I have looked at all the auto reply messages here as well as for
"procmail autoresponder" on Google, and still have not found a
solution.
For certain e-mail that I receive, I add a number of X-*data:
headers, where * represents one or more ASCII characters. These
e-mails then may have one or more of such headers.
To such an e-mail I would like to auto-reply, and do special
things dependent for _each_ X-*data: header.
Question: is it possible to split up an auto-reply across
multiple recipes? Is it possible to slowly build the auto-reply body
across multiple recipes?
For the moment, I cannot get past the _first_ recipe that
creates the body: the echo "Hello". Rcount contains the number of
X-*data: that have been treated.
:0 fhw
* rcount ?? ^0^
| formail -rtA"X-Loop: sobek(_at_)irit(_dot_)fr" \
-I"Reply-To: sobek(_at_)irit(_dot_)fr" \
-I"Subject: $rsubj" \
-a"Message-ID:"
:0 e
{
LOG="****Error: Formail failed at `date`
"
}
# Replace body with reply
:0 fbw
* rcount ?? ^0^
| echo "Hello $FULLNAME, \
\
"
:0 Efbw
| echo "I am also interested ... $Name\
\
"
# add data-file
:0 b
| cat -; cat $FILE
:0 Ab
| cat -; echo " "
In case this cannot be done, then possible via recursive RC
files. For example:
rc1:
treat X-1Data:
rc2:
treat X-2Data:
rc3:
treat X-3Data:
intialize auto-reply
end
add to auto-reply
end
add to auto-reply
call sendmail
I suppose that procmail RC files cannot have local variables.
Another possibility is to write everything to a temporary file, and
the do an auto-reply at the end. This looks like the most plausible
solution. Is it possible to get procmail's PID in order to create a
unique temporary file idenifier?
Thanks for your suggestions and ideas.
--Ralph
Dr. Ralph P. Sobek Disclaimer: The above ruminations are my own.
Ralph.Sobek @ irit.fr http://www.sobek.org/
sobek @ irit.fr Wi-Fi: http://www.irit.fr/~Ralph.Sobek/wifi
Ph:(+33)[0]561556356 FAX:(+33)[0]561556847 http://www.irit.fr/~Ralph.Sobek/
===============================================================================
Boycott ESSO/EXXON until they agree to the Kyoto Accords. See www.stopesso.com
SPAMMERS Beware: http://www.irit.fr/~Ralph.Sobek/welcome.shtml#Mail-Warning
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail