Solved

procmail - multiple pipes and perl scrtipts

Posted on 2004-04-06
1
455 Views
Last Modified: 2012-08-13
I am trying to process mail through two perl scripts by calling them in a procmail recipe. The first script reads in the mail and does some editing, then the second script outputs the result to a file specified in the script. So my recipe is set up like this:

:0w
* ^Subject:*.Report.*
|/usr/local/bin/perl $HOME/script1.pl | $HOME/script2.pl

I know both scripts run correctly. I have tried using a test mbox file via command line (i.e. script1.pl testfile | script2.pl) before trying it out with procmail, and it runs without a hitch. Any guesses why this doesn't work?
0
Comment
Question by:pulse2600
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
Alf666 earned 250 total points
ID: 10768634
You have to serialize them in different rules :

:0fw
* ^Subject:*.Report.*
|/usr/local/bin/perl $HOME/script1.pl

:0w
|/usr/local/bin/perl $HOME/script2.pl

Check the doc for the proper flags, but I'm pretty sure this should work.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question