procmail
[Top] [All Lists]

Re: Bizarre behaviour with $ variable substitution with pipe-command-pipe (autoresponder)

2004-09-22 04:52:23
On Tue, Sep 21, 2004 at 11:47:41AM -0700, Joey Lyman wrote:

can't find a solution to the problem I'm
having....


:0 hc
| ($FORMAIL -rk -A "X-Loop: jlyman(_at_)flyerplus(_dot_)com" \
-A "Precendence: junk"; \
$CAT ${MAILDIR}/jlyman.txt ) | $SENDMAIL -t -oi


I suspect your problem is that your argument set to sendmail is
improper.  "-oi" and "-t"  have to be stated in order, I
believe.

   $SENDMAIL -oi -t

Moreover, your compile of procmail ought to have $SENDMAILFLAGS
already defined, and it is usually "-oi".  So you should be doing,

  $SENDMAIL $SENDMAILFLAGS -t

Also, why have you "variabalized" cat?  Your path should suffice
and just "cat" should be fine unless you have weird reason for
deviating from that.

Last, while your invocation of $MAILDIR isn't causing your problem, it
also doesn't make a lot of sense.  "MAILDIR" in procmail is not a
static place but is an environment statement.  It means "the current
working directory"; and you set it when you want to change it from
the defaults (see "man procmailrc").

    MAILDIR = /some/place

is procmail's equivalent to the "chdir" command in the shell:

    chdir /some/place

The MAILDIR statement alone is equivalent to, at the shell,

    pwd

So just as you could state this and it would work:

    cat `chdir .`/somefile

why would you do it that way?  You'd want to just say:


   cat somefile

or, if you insist,

  cat ./somefile


Similarly, in procmail, you don't need $MAILDIR in a path statement.
$MAILDIR is where you are now or where you want to set it to be.

   cat jlyman.txt

should suffice.

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail