SPUG: Procmail
Trey Valenta
trey at anvils.org
Mon May 29 12:11:51 CDT 2000
On 2000 May 26, 18:01, marlin wrote:
} Subject: SPUG: Procmail
> Anybody out there know how to make Procmail pipe an imcoming email
> (with "inventory" as subject) to a Perl script?
>
> Here's what doesn't work...
>
> :0
> * ^Subject:.*inventory
> | /path/to/script.pl
>
> Pseudo-Perl is like this...
>
> while (<>) {
> $msg .= $_;
> }
> process $msg;
To start, you can put this in your .procmailrc file to get some logs.
VERBOSE=on
LOGFILE=$HOME/.proclog
I think I've come across this before and fixed it by changing below to
while (<STDIN>) {
I haven't delved into why <> doesn't work and what procmail does when
opening filehandles. And then again, I could be wrong on the answer
anyway. It's early and been a while since I ran into this.
/trey
--
trey valenta trey at anvils.org seattle (maybe a) random quote--v
Love is a grave mental disease.
-- Plato
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
For Subscriptions, Email to majordomo at pm.org: ACTION spug-list EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address
More information about the spug-list
mailing list