procmail
[Top] [All Lists]

intelligent autoresponder

1997-01-13 05:06:39
Hi,

I found following statement in a readme file:

# The following command will send a file named
# autoresponder.txt that resides in the fileserver directory
# in reply to any message sent to autoresponder(_at_)domain(_dot_)com

:0
* ^TOautoresponder
*!^FROM_DAEMON
*!^X-Loop: autoresponder(_at_)domain(_dot_)com
|(formail -r -A "Precedence: junk"\
-I"From: Auto Reply from domain.com <autoresponder(_at_)domain(_dot_)com>" \
-I"Subject: Information Request" \
-A "X-Loop: autoresponder(_at_)domain(_dot_)com";\
cat $FILEDIR/autoresponder.txt )|$SENDMAIL -t

If I want to add a second autoresponder, say 
autoresponder2(_at_)domain(_dot_)com
(with the file autoresponder.txt in the $FILEDIR) I have do copy
the above commands...

But this is pretty much work to be done for many addresses :-(

Does anybody have a good idea - or even already programmed - an
"intelligent" autoresponder?

I thought about this:

I have a $FILEDIR with the files

  autoresponder.txt
  autoresponder2.txt
  autoresponder3.txt
  autoresponder4.txt
  autoresponder5.txt
  
Than procmail does a look in the filedir, and if it finds a
$FILENAME.txt matching with exactly with $FILENAME(_at_)domain(_dot_)com
it sends the corresponding file.

So, if I want to add a new autoresponder, I simply have to
copy a new file in $FILEDIR ;-)

Or is this absolutely impossible with procmail without a perl-script?

Thank you very much!

   Costa

<Prev in Thread] Current Thread [Next in Thread>