On Monday 2004 October 4 05:27, Jon Clausen wrote: <SNIP>
Well... Pipes may not be appropriate for what you want to achieve here, but...
The concept itself is very simple:
command1 | command2
basically executes `command1` and takes whatever output this produces, and feeds it to `command2`. Pretty simple. Now, in reality it *is* a bit more complex than that, but that's another subject.
(While we're on the subj... I was hopig to also get the process using Mailder rather than mbox, and putting msgs in KMail's inbox, etc. Had it working, once, then it busted & I don't know what I did. Guess that's another post; right?)
Probably :)
In any case I may as well explain why pipes is the right thing for me (and incidentally why they might not be for you):
My system is set up so that incoming mail is passed from
Postfix -> Procmail For processing Procmail -> SpamAssassin For Spam-classification SpamAssassin -> Procmail For further processing (including user procmailrcs) Procmail -> Cyrus For final delivery
Now, it's in this final step, where the user procmailrc contains the pipe that feeds it's data (each message) to
$IMAPCOMMAND $Destination
$IMAPCOMMAND contains "/usr/lib/cyrus/bin/deliver -a $USER -q -m"
and
$Destination contains something like "user.SLE"
which all tells *Cyrus* what to do with the message.
The reason for all this is that I'm *accessing* my mail through (Cyrus) IMAP only. And Cyrus takes care of all the 'housekeeping', including where to put the actual file in the filesystem, and subsequent manipulations like moving msgs around and deleting them and so on.
Under this scheme each message is still just a file, but *I* don't own it, *Cyrus* does. And in fact *I* (the user) haven't got read-priviliges in the area where Cyrus keeps the messages (/var/spool/imap/user/)
And so:
Unless you have some sort of MDA to take care of final delivery, you probably don't want to pipe anything anywhere.
Just let Procmail write the file in your ~/Mail/inbox/new - or wherever Kmail expects to see new messages (I don't know. I haven't used Kmail in quite a while, and never like that...)
Hope I'm not confusing you with all this, but it seemed prudent to explain why I'm using pipes, and why it might not be appropriate for you
/Jon
-- Just say "know!"
I appreciate the detailed explanation! I think I understand a little better. -- "Yogi" CH Namaste Yoga Studio