To allow users to test their mail configuration, I like echo repliers
like echo(_at_)cnam(_dot_)fr or ping(_at_)oleane(_dot_)net(_dot_)
I would like to make a simple echo replier with procmail. I followed the
example in procmailex(5) and it works fine.
But I would like to send back the headers (and may be the body) of the
original message. How could I do it in procmail?
Here is the current setup:
# Echo service
:0:/tmp/echo.procmail.lock
* ^To: *echo
* !^FROM_DAEMON
* !^X-Loop: echo(_at_)my(_dot_)domain
| (formail -rt -A"Precedence: junk" \
-A"X-URL: http://www.my.domain/" \
-A"From: postmaster (Echo service)" \
-A"X-Loop: echo(_at_)my(_dot_)domain" ; \
echo "Message received."; \
echo "A small ad"; \
echo "http://www.my.domain/") | $SENDMAIL -t
Stephane Bortzmeyer Institut Pasteur
bortzmeyer(_at_)pasteur(_dot_)fr Service d'Informatique Scientifique
Paris, France
+33 1 40 61 34 62
http://web.cnam.fr/personnes/bortzmeyer/home_page.dom