procmail
[Top] [All Lists]

RE: Newbie - How do I get procmail to create a mailbox correctly?

2006-03-06 08:54:19

On Mon, 6 Mar 2006, John Binder wrote:

Thanks Dallman, I do have the DROPPRIVS=yes set in procmailrc. I thought
that would do it. I am calling procmail from postfix using two lines in
master.cf:

procmail  unix  -       n       n       -       -       pipe
    flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc
$(sender) ${recipient} ${user}

It seems that whenever a new user is added the /var/mail/username file is
created but the ownership will always be nobody

-rw-------   1 nobody  mail  2885 Mar  6 02:51 username

No matter what "phantom" user I use it procmail assigns ownership to the
phantom user.

I want all incoming mail to be processed by spamassassin prior to delivery.
I think that this would be appropriate at the /etc/procmailrc level. My
rcfile looks like:

SHELL=/bin/sh
LOGFILE=/var/log/procmail # this can be deleted after testing
VERBOSE=yes
USER=$3
HOME=/Users/$USER
DROPPRIVS=yes

:0fiw
| spamc  # call Spamassassin

INCLUDERC=$HOME/.procmailrc  # allow users to create their own recipes

        I think that this include must be at the end of the script (if
        needed).



:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null
#trash all messages with a very high spam score

        Don't need to lock null


:0w
* ^TO_username*
 /var/mail/username

        1. Here you need the locker.
        2. Do you have only one user and his/her name `username' ?

:0:
* $ ^TO_$LOGNAME
/var/mail/$LOGNAME

Bye,
  Udi


Can anyone see where I am going wrong? Thanks in advance!

John C. Binder
Ogden, UT

-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE] On Behalf Of 
Dallman Ross
Sent: Sunday, March 05, 2006 4:43 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Newbie - How do I get procmail to create a mailbox correctly?

On Sat, Mar 04, 2006 at 04:08:03PM -0700, John Binder wrote:

How do I tell Procmail to create the mailbox file using the
recipient as the file's owner?

Use

 DROPPRIVS=yes

as described in the fine manual pages, or let the /etc/procmailrc
end and let the user's own .procmailrc take over (automatically)
for delivery.

Dallman


____________________________________________________________
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