procmail
[Top] [All Lists]

Questions about pipes and "-m" option

2002-08-20 11:05:27
Hello, I'm running qmail on a FreeBSD-4.6.2 system; I am having trouble
understanding a couple things.  The version of procmail I've installed
is 3.22.

I am getting an error on a pipe I call from a procmail rcfile; however,
the error only occurs when I use _more than one_ pipe.  I'll show you
what I mean (I'm not actually intending to use 'cat' of course, but it's
the simplest way to demonstrate the problem):

I have a 1KB mail message stored in the following file:

test/new/1029862540.63133_0.barrel.alongtheway.com

So, I invoke procmail like so:

procmail -m ./.procmailrc < test/new/1029862540.63133_0.barrel.alongtheway.com

./.procmailrc contains the following:

=====================================
DEFAULT=$HOME/test/
LOGFILE=$HOME/procmail.log
VERBOSE=yes

:0fw
| cat | cat

:0
$DEFAULT
=====================================

$HOME/test/ is a Maildir.

in procmail.log, the following is written:

procmail: [91103] Tue Aug 20 13:33:46 2002
procmail: Executing " cat | cat"
procmail: [91103] Tue Aug 20 13:33:46 2002
procmail: Program failure (1) of " cat | cat"
procmail: Rescue of unfiltered data succeeded
procmail: [91103] Tue Aug 20 13:33:46 2002
procmail: Assigning
"LASTFOLDER=/home/jamesb/test/new/1029864826.91103_0.barrel.alongtheway.com"
 Subject: test small msg 4
  Folder: /home/jamesb/test/new/1029864826.91103_0.barrel.alongthe 909

However, if I remove the second "| cat", I do not get this error.

In the 'procmailex' man page I see several examples which deliver
through multiple pipes; is there something wrong with my syntax?


The other question I have is regarding the purpose of the '-m' option.
If I do not use it, procmail writes the following to stderr:

procmail: Couldn't create "/var/mail/jamesb"

In order to suppress that error, I have been calling procmail from my
~/.qmail* files like so:

| preline procmail -p -m .procmailrc

(If there is a different, "recommended" method of calling it from
~/.qmail* please let me know.)

On one of the FAQ pages linked from www.procmail.org, I found the
following explanation of -m:

"The -m option is rather vaguely documented; it will arrange with
additional safety nets by disabling the default delivery and treating
file names as relative to the current directory (as opposed to your home
directory, which makes sense when invoking Procmail from a .forward or
similar)."

Why does procmail even care about /var/mail/jamesb if I have re-defined
$DEFAULT?  Is there any disadvantage to using -m?  Since I don't really
understand what it does and why I appear to need it, I don't know if I
am putting my mail at extra risk by using or not using it.

Thanks.
_______________________________________________
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>