procmail
[Top] [All Lists]

RE: complex auto-reply question

1999-09-08 07:54:26
On Wed, 8 Sep 1999 16:31:40 +0200, "W. Dallman Ross" <dman(_at_)ccc-e(_dot_)net>
wrote:
I'm not sure what the -d is.  I don't think procmail is running
setuid root on this system.  How does one tell?  When I put a
.procmailrc in my home dir, it did not automatically invoke.
I had to set my .forward to point to the procmail executable.
I deduced from that that it's not setuid root.  My memory
is hazy on having read the readme for the makefile a couple
of years ago on another system, but I seem to recall that setuid
root would result in procmail's invoking whenever a .procmailrc
exists in a user's home dir.

No, those are not related. Setuid is a permission bit on the Procmail
executable file and you can look at it by doing an ls -l on it. If
there's an "s" where you'd normally see merely an "x" (for executable
permission) in the permissions field, it's setuid.

The need for a .forward implies that Procmail is not being invoked
from sendmail.cf (or your MTA's equivalent if you're not using
Sendmail) and that thus there is no -d argument being passed in.

Some things will work much better if Procmail is installed as the
system-wide default LDA from sendmail.cf -- namely, among other
things, that the user on whose behalf Procmail is being invoked is
being passed in explicitly, so you can really tell who a message is
for.

you can add the -a something option to the procmail command line
in your .forward, and then your rcfiles can tell who the envelope
recipient is:

ARG=$1

:0
* ARG ?? something
{ RECIPIENT=me }
:0E
* ARG ?? ^^^^
{ RECIPIENT=her }
:0E
{ RECIPIENT=interloper }

Here we come to my separate question that era answered part
of about what the carets mean.  I take it they mean scoring?
That is probably why I took a few days to get back to and
answer this -- because my "eyes rolled up into my brain"
again.  :-)

Oops, I misunderstood your question the first time. The ^^ anchor
stands for beginning or end of the search space, and ^^^^ means that
ARG (in this case) is completely empty (beginning of search space and
end of search space are adjacent).

I had not known about the -a flag in the .forward.  Will
have to read the man pages again.  Sounds promising.

Okay, I skimmed the man page.  I tried this in my .forward:
"|IFS=' ';/usr/bin/procmail -a weird -tf- || exit 75 #dross"
The only difference from what I had previously is the
-a flag and the argument "wierd".  I sent myself a
message, but the word "weird" did not show up anywhere
in the headers.  I sent from the local system, if that
makes any difference.  This is under procmail v3.11pre7.

It's not supposed to be in the headers, it's supposed to be in $1 --
but you already know whose .forward is being invoked, because you
(should) know which .procmailrc is being executed. This might be
different from whose account the mail was originally delivered to, if
you use a straight .forward to another account, for example (not
invoking Procmail, just forwarding mail to another place).

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

<Prev in Thread] Current Thread [Next in Thread>