Subject: Re: procmail in /etc/aliases

From: [email-masked] (Stephen R. van den Berg)
Date: Tue, 28 Feb 1995 19:25:13 +0100

[email-masked] <[email-masked]> wrote:
>I'm still trying to find out the proper way to install procmail in
>/etc/aliases.  Does it need to be installed suid?  Do I use the -d or -m
>flags.  How do I pass arguements to the procmailrc file if I use the -m
>flag?

If you want to use the /etc/procmailrcs/ feature, you need to apply
a patch (because this was accidentally disabled in v3.10).

Running procmail from the aliases file is quite similar to starting
it from the command line.  The only difference is that it will be running
with the uid of the sender (or daemon if the sender is remote).

You can ensure that procmail is running under a particular uid by using
either (procmail *must* be suid root in order for this to work):

	procmail -d user
or	procmail -m /etc/procmailrcs/somefile

Parameters can be passed as follows:

Only one parameter possible:

	procmail -a parameter -d user

Unlimited no. of parameters possible:

	procmail -m /etc/procmailrcs/somefile par1 par2 par3 ...

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

"<Clarions sounding> *No one* expects the Spanish inquisition!"

---

From: [email-masked] (Stephen R. van den Berg)
Date: Thu, 2 Mar 1995 20:01:39 +0100

[email-masked] <[email-masked]> wrote:
>Is there a way to specify a procmailrc file with the -d option.

No.  That would create a security hole.

>I would like to be able to put in my /etc/aliases:

>person: "|/etc/procmail -a 'USER=person' -d person -f /etc/procmailrc"

>Then in /etc/procmailrc I can use the USER value to do something
>different for different users.

1. /etc/procmailrc is *always* read first if procmail is invoked with -d.
2. LOGNAME is already set to person (before /etc/procmailrc is read).
3. procmail -a 'USER=person' -d person does NOT set the variable USER.
   To get the same effect use:
   procmail -a person -d person
   Then, in the .procmailrc:
	USER="$1"

Real programmers don't just die, they produce core dumps.

---

From: [email-masked] (Stephen R. van den Berg)
Date: Tue, 14 Mar 1995 17:26:12 +0100

"Brian J. Coan" <[email-masked]> wrote:
>[email-masked] (Stephen R. van den Berg) wrote:

>i missed seeing the patch, could you post it again (or if it's
>in the ftp repository, then just say so, i'll go looking there).

Send mail:

	To: [email-masked]
	Subject: archive get latest/1

Be braver.  You cannot cross a chasm in two small jumps.