aspose file tools*
The moose likes Linux / UNIX and the fly likes how to call a simple perl script in procmail. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to call a simple perl script in procmail." Watch "how to call a simple perl script in procmail." New topic
Author

how to call a simple perl script in procmail.

jing hu
Ranch Hand

Joined: Jun 30, 2009
Posts: 63
Now I want to process some email automatically.
So I use fetchmail to fetch mail per second. And use procmail to filter some email message.
My procmail configuration procmailrc is like below

I want to call perlout to create a new file test.cpp
the source code perlout is below

I use the command : fetchmail -akv -m "/usr/bin/procmail -d %T" to call fetchmail and call the procmail.
ButI find the perlout won't run out of my expectation.

and the procmail show that *procmail: Error while writing to "/home/max/perlout
so I think the perl script are not called.
I am sure the perlout path is correct.
Any comments will be welcome.
Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

Have you marked the Perl script as executable?


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to call a simple perl script in procmail.