procmail
[Top] [All Lists]

Re: spawning an external app

2001-02-17 21:00:55
At 10:48 PM -0500 2/17/01, D E Hammond wrote:
On 17 Feb, Justin Shore wrote:
| 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
|
| [...]
|
| * !^X-Loop: $VIRUSADDR
| [...]

Philip solved the problem you asked about, but there appears to be two
you haven't discovered yet. The two occurences of the condition above
need a leading '$' to have the variable expanded. Something like:

* $ !^X-Loop: $VIRUSADDR

You can see it in the log entry for that condition where $VIRUSADDR has
not been expanded.

Don,
Thanks for the heads up. I hadn't even noticed that. Here's the log output from the working recipe:

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/cat "/etc/mail/vbs.ss-txt") | $SENDMAIL -t"
procmail: [22349] Sat Feb 17 20:59:20 2001
procmail: Assigning "PATH=/bin:/usr/bin:/usr/local/bin"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "VIRUSADDR=virus-alert(_at_)sktc(_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"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"
From macdaddy(_at_)vinnie(_dot_)ksu(_dot_)ksu(_dot_)edu  Sat Feb 17 20:59:20 
2001
 Subject: Test bounce message
  Folder: /var/spool/mail/shorej                                           1047
procmail: Executing " (formail -r \
-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"


It shows that the variables haven't been expanded yet but the message does get to me ok. Is that something to be concerned about? Thanks for the input.

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>