procmail
[Top] [All Lists]

Re: help about procmail

2009-07-11 14:13:18
Massimo,

I use sendmail instead of postfix, but the use of procmail is probably
the same.  

You have to drop privileges before you save the file by the line command
in the /etc/procmailrc file :

DROPPRIVS=YES

This should appear right before you save the file in the /etc/procmailrc
file if your setup is system wide.  If you have in
a /home/user/.procmailrc file in the user's home directory the same is
probably true, but I don't like to use the user's /home/usr/.procmailrc
set up because I always forget it is there.

-  
Greg


On Sat, 2009-07-11 at 14:48 +0200, Massimo Sironi wrote:
Hi Tom,


I'm using an /etc/procmailrc file than include a file with rules
customized for each users (the file is under the homedir of each
user).

My /etc/procmailrc is:

---------------------------------------------------------------------------------------------------------
MAILDIR=$HOME/Maildir

DEFAULT=$MAILDIR/

PMDIR = $MAILDIR/.Pm
PMSRC = $PMDIR

VERBOSE=yes 
LOGABSTRACT = all 
LOGFILE=$MAILDIR/.Pm/procmail.log

LOCKFILE=$MAILDIR/.Pm/lockmail
MONAT=`date +%b-%Y`
SHELL=/bin/sh
PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
DATE = `date +%B-%Y`

INCLUDERC = $PMDIR/rules.rc
---------------------------------------------------------------------------------------------------------

the $PMDIR/rules.rc for a user is:

---------------------------------------------------------------------------------------------------------
:0
* ^(From):(_dot_)*max(_at_)lontra(_dot_)no-ip(_dot_)org(_dot_)*
.max/
---------------------------------------------------------------------------------------------------------


The log file is:
---------------------------------------------------------------------------------------------------------
procmail: Assigning "LOCKFILE=/home/gino/Maildir/.Pm/lockmail"
procmail: Locking "/home/gino/Maildir/.Pm/lockmail"
procmail: Executing "date,+%b-%Y"
procmail: Assigning "MONAT=Jul-2009"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "PATH=/home/gino/bin:/bin:/usr/bin:/usr/local/bin"
procmail: Executing "date,+%B-%Y"
procmail: Assigning "DATE=July-2009"
procmail: Assigning "INCLUDERC=/home/gino/Maildir/.Pm/rules.rc"
procmail: Match on 
"^(From):(_dot_)*max(_at_)lontra(_dot_)no-ip(_dot_)org(_dot_)*"
procmail: Assigning "LASTFOLDER=.max/new/1247240832.5395_1.posta804"
procmail: Notified comsat:
"gino(_at_)0:/home/gino/Maildir/.max/new/1247240832.5395_1.posta804"
From max(_at_)lontra(_dot_)no-ip(_dot_)org  Fri Jul 10 17:47:12 2009
 Subject: prova spostata
  Folder: .max/new/1247240832.5395_1.posta804
1239
procmail: Unlocking "/home/gino/Maildir/.Pm/lockmail"
procmail: Assigning "LOCKFILE=/home/gino/Maildir/.Pm/lockmail"
procmail: Locking "/home/gino/Maildir/.Pm/lockmail"
procmail: Executing "date,+%b-%Y"
procmail: Assigning "MONAT=Jul-2009"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "PATH=/home/gino/bin:/bin:/usr/bin:/usr/local/bin"
procmail: Executing "date,+%B-%Y"
procmail: [5454] Fri Jul 10 17:50:32 2009
procmail: Assigning "DATE=July-2009"
procmail: Assigning "INCLUDERC=/home/gino/Maildir/.Pm/rules.rc"
procmail: Match on 
"^(From):(_dot_)*max(_at_)lontra(_dot_)no-ip(_dot_)org(_dot_)*"
procmail: Assigning "LASTFOLDER=.max/new/1247241031.5454_1.posta804"
procmail: Notified comsat:
"gino(_at_)0:/home/gino/Maildir/.max/new/1247241031.5454_1.posta804"
From max(_at_)lontra(_dot_)no-ip(_dot_)org  Fri Jul 10 17:50:31 2009
 Subject: Re: eqwe
  Folder: .max/new/1247241031.5454_1.posta804
1350
procmail: Unlocking "/home/gino/Maildir/.Pm/lockmail"
---------------------------------------------------------------------------------------------------------


The "max" folder of "gino" mailbox contain this files:

---------------------------------------------------------------------------------------------------------
root(_at_)posta804:/home/gino/Maildir/.max# ll -R
.:
total 32
drwx------  6 gino users 4096 2009-07-10 17:49 .
drwx------ 14 gino users 4096 2009-07-10 14:30 ..
-rw-r--r--  1 gino users   43 2009-07-10 17:49 courierimapacl
drwx------  2 gino users 4096 2009-07-10 17:49 courierimapkeywords
-rw-r--r--  1 gino users   15 2009-07-10 17:49 courierimapuiddb
drwx------  2 gino users 4096 2009-07-10 17:49 cur
drwx------  2 gino users 4096 2009-07-10 17:50 new
drwx------  2 gino users 4096 2009-07-10 17:50 tmp

./courierimapkeywords:
total 8
drwx------ 2 gino users 4096 2009-07-10 17:49 .
drwx------ 6 gino users 4096 2009-07-10 17:49 ..

./cur:
total 8
drwx------ 2 gino users 4096 2009-07-10 17:49 .
drwx------ 6 gino users 4096 2009-07-10 17:49 ..

./new:
total 12
drwx------ 2 gino users 4096 2009-07-10 17:50 .
drwx------ 6 gino users 4096 2009-07-10 17:49 ..
-rw------- 1 root mail  1350 2009-07-10 17:50
1247241031.5454_1.posta804

./tmp:
total 8
drwx------ 2 gino users 4096 2009-07-10 17:50 .
drwx------ 6 gino users 4096 2009-07-10 17:49 ..
---------------------------------------------------------------------------------------------------------

The message is moved in the right folder but the permission are wrong

Of corse... I do something wrong... but what???


thanks for help,
Max



On Sat, Jul 11, 2009 at 2:28 PM, Thomas Göbel
<GoebelTh31611(_at_)ohm-hochschule(_dot_)de> wrote:
        * Massimo Sironi <maxsironi(_at_)gmail(_dot_)com> [11.07.2009 14:24]:
        > Hi All,
        >
        > I have a strange problem with procmail (v 3.22) on ubuntu
        8.04 LTS.
        > procmail is triggered by postfix (mailbox_command param)
        and, when  a
        > message match a rule, this message in moved in the right
        folder but the file
        > related to that mail (I'm using maildir format) is owned by
        root and not by
        > user. So, the user can't read the message.
        >
        
        What is the output of the logfile? Something strange there? Do
        you use a
         procmailrc for your own user, i.e /home/.../.procmailrc or a
        system-wide
        procmailrc?
        
        Tom
        --
        ()  ascii ribbon campaign - against html e-mail
        /\  www.asciiribbon.org   - against proprietary attachments
        ____________________________________________________________
        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

____________________________________________________________
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

____________________________________________________________
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

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