procmail
[Top] [All Lists]

spawning an external app

2001-02-17 18:41:46
I'm having getting an external app to spawn as an action. Could someone take a peak at my recipe and offer some advice? Thanks


Ok, this one works fine. If the subject matches, echo pipes some generic output into sendmail and sends the reply:

VIRUSADDR=virus-alert(_at_)blah(_dot_)net
:0 h c
* !^FROM_DAEMON
* !^X-Loop: $VIRUSADDR
* ^Subject: Test bounce message
| (formail -r \
-I"Precedence: junk" \
-I"From: SKTC Virus Alert Daemon <$VIRUSADDR>" \
-I"Subject: [Virus Alert]  You've been infected" \
-A"X-Loop: $VIRUSADDR" ; \
echo "Mail received.") | $SENDMAIL -t


This one doesn't work though.  The error follows the recipe:

VIRUSADDR=virus-alert(_at_)blah(_dot_)net
:0 h c
* !^FROM_DAEMON
* !^X-Loop: $VIRUSADDR
* ^Subject: Test bounce message
| (formail -r \
-I"Precedence: junk" \
-I"From: SKTC Virus Alert Daemon <$VIRUSADDR>" \
-I"Subject: [Virus Alert]  You've been infected" \
-A"X-Loop: $VIRUSADDR" ; \
/bin/cat "/etc/mail/vbs.ss-txt") | $SENDMAIL -t


procmail: [19278] Sat Feb 17 18:46:45 2001
procmail: Assigning "PATH=/bin:/usr/bin:/usr/local/bin"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "VIRUSADDR=virus-alert(_at_)blah(_dot_)net"
procmail: Match on ! "(^(Mailing-List:|Precedence:.*(junk|bulk|list)|To: Multiple recipients of |(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )([^>]*[^((_dot_)%(_at_)a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|m(mdf|ajordomo)|n?uucp|LIST(SERV|proc)|NETSERV|o(wner|ps)|r(e(quest|sponse)|oot)|b(ounce|bs\.smtp)|echo|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR|utoanswer))(([^).!:a-z0-9][-_a-z0-9]*)?[%@> ][^<)]*(\(.*\).*)?)?$([^>]|$)))"
procmail: Match on ! "^X-Loop: $VIRUSADDR"
procmail: Match on "^Subject: Test bounce message"
procmail: Assigning "LASTFOLDER= (formail -r \
-I"Precedence: junk" \
-I"From: SKTC Virus Alert Daemon <$VIRUSADDR>" \
-I"Subject: [Virus Alert]  You've been infected" \
-A"X-Loop: $VIRUSADDR" ; \
procmail: Skipped "/bin/cat "/etc/mail/vbs.ss-txt") | $SENDMAIL -t"
From macdaddy(_at_)me(_dot_)edu  Sat Feb 17 18:46:45 2001
 Subject: Test bounce message
  Folder: /var/spool/mail/shorej                                           1047
procmail: Executing " (formail -r \
-I"Precedence: junk" \
-I"From: SKTC Virus Alert Daemon <$VIRUSADDR>" \
-I"Subject: [Virus Alert]  You've been infected" \
-A"X-Loop: $VIRUSADDR" ; \
/bin/sh: -c: line 7: syntax error: unexpected end of file


FYI, virus-alert is an alias on that box for shorej, explaining why it wrote to shorej's mail spool. Any ideas what I'm doing wrong? What I'm trying to do here is match mail with the subject line of that annakornakova (sp?) virus and reply to the sender with a form letter explaining the situation and give them soom useful information on how to rid themselves of it. I've got the matching of the virus done already and I'm dumping those matches to file but I don't have this part working yet. I freely admit, I'm not a procmail guru, obviously because the answer is probably to undo something stupid I did. :) If anyone can point me in the right direction, I'd appreciate it. I've looked at most of the examples in the assorted FAQs and nothing stood out and grabbed my attention. Thanks

Justin
--

--
Justin Shore       K-State Linux Distro Mirror, Sysadmin
macdaddy(_at_)vinnie(_dot_)ksu(_dot_)ksu(_dot_)edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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