procmail
[Top] [All Lists]

New User: Locking file issue and other bits

2003-02-05 04:05:13
Hi List,

I'm new to both Linux and Procmail, so I hope you can help me.

I have an operational mail system on my home network that uses 
fetchmail/postfix/procmail. I have a single dial up account and 3 PC's/users 
(1x Linux, 2 x Win). I use procmail to filter generally on subject or from, to 
go to my wife, kids or me, i.e. I have tried to achieve a multi user account 
via a single ISP account. I run Redhat 8.0, with all the latest patches.

Anyway, now it is all running and I understand a little more than when I first 
started I've decided to refine my mail system.

Just to background a little more. I have .procmailrc files in each of the home 
dirs.

Having a /etc/procmail/.procmailrc file did not seem to work (but I will try to 
correct this as a global .procmailrc file seems appropriate in my case and I 
need to do more homework before I ask for help).

- Phase 1 of plan: "Drop" mail in /var/spool/mail/<user>

A typical .procmailrc file I created:

PMDIR=/etc/procmail
LOGFILE=/var/log/procmail.log
LOG="
"
##VERBOSE=yes
##LOGABSTRACT=no
MAILDIR=$HOME/evolution
INCLUDERC=$PMDIR/rc.daddy
INCLUDERC=$PMDIR/rc.logan

Filters used for testing (not used concurrently, included in the rc.daddy file):

#Red Hat filter 1 NEW
:0:
* ^Subject:.*Redhat
/var/spool/mail/roland

#Red Hat filter 2 EXISTING
:0
* ^Subject:.*Red Hat
* !^X-Loop: seenit6
        | formail -A "X-Loop: seenit6" | \
            $SENDMAIL -oi roland(_at_)monaro(_dot_)local

At the moment I forward the message (see EXISTING recipe) and use a formail 
script(?) to stop mail loops. This does not seem efficient. But as I found out 
tonight this was my work-around because I had lockfile errors when the NEW 
recipe was used - as follows:

procmail: Lock failure on "/var/spool/mail/roland.lock"
procmail: Error while writing to "/var/spool/mail/roland"
From root(_at_)monaro(_dot_)local  Tue Feb  4 23:00:45 2003
Subject: Redhat
Folder:/var/spool/mail/rachel

Now, I googled and found a suggestion RH list archives to:

chown root.mail /var/spool/mail
chmod 775 /var/spool/mail

This didn't work.

If I chmod 666 /var/spool/mail/roland then the "Error while writing..." 
disappears, the "Lock failure on...." stays, BUT the message is delivered as 
per the recipe.

I read that 666 should be used with care. Have I done the correct thing?

Can someone help me solve how to remove the lock file error? I haven't found an 
answer yet (that I understand), even searched the procmail archives prior to 
posting.

I understand why to use a lock file.

I assume that roland.lock doesn't exist? I use Evolution. Should that program 
create a lock file for this to work? (its the principle I'm after, I'll check 
individual programs).

Finally, my aim with the filters is that what "falls out the bottom" goes to my 
wife as the dominant user. Do I do this with the DEFAULT setting, and if so, is 
the following usage okay:

DEFAULT=/var/spool/mail/rachel

Sorry about the length of the message. Please let me know if I haven't provided 
enough information.

Regards,

Roland Hill

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
For more information please visit www.marshalsoftware.com
#####################################################################################

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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