[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Procmail again



* Barrie Bremner (baz [at] barriebremner.com) wrote:
> 
> OK,
> 
> I had a look at everything again, and came across the following shell
> script in man procmail (changed slightly):
> 
>  #!/bin/sh
> 
>               ORGMAIL=$HOME/Mailbox
> 
>               if cd $HOME &&
>                test -s $ORGMAIL &&
>                lockfile -r0 -l1024 .newmail.lock 2>/dev/null
>               then
>                 trap "rm -f .newmail.lock" 1 2 3 13 15
>                 umask 077
>                 lockfile -l1024 -ml
>                 cat $ORGMAIL >>.newmail &&
>                  cat /dev/null >$ORGMAIL
>                 lockfile -mu
>                 formail -s procmail <.newmail &&
>                  rm -f .newmail
>                 rm -f .newmail.lock
>               fi
>               exit 0
> 
> My procmail config reads:
> 
> # .procmailrc
> 
> PATH=/usr/bin:/usr/local/bin:/bin
> MAILDIR=$HOME
> LOGFILE=$HOME/proclog
> SHELL=/bin/bash
> DEFAULT=Mailbox
> LOCKFILE=$home/.procmail.lock

Should probably read $HOME/.procmail.log

> 
> # Put mail from ShefLUG mailing list into Sheflug mailbox
> :0:
> * ^Subject:.*Sheflug
> Sheflug
> 
> # Put mail from WiltsLUG mailing list into Wiltslug mailbox
> :0:
> * ^Subject:.*wiltshire
> Wiltslug
> 
> # Default rule
> :0:
> $DEFAULT
> 
> Now, running the shell script does filter my Mailbox file correctly -
> if rather slowly.
> I get the following errors:
> 
> [baz@flux baz]$ ./runprocmail.sh 
> procmail: Renaming bogus mailbox "/var/spool/mail/baz" info "/var/spool/mail/BOGUS.baz.I7E"
> procmail: Couldn't create "/var/spool/mail/baz"
> procmail: Renaming bogus mailbox "/var/spool/mail/baz" info "/var/spool/mail/BOGUS.baz.I7E"
> procmail: Couldn't create "/var/spool/mail/baz"
> procmail: Renaming bogus mailbox "/var/spool/mail/baz" info "/var/spool/mail/BOGUS.baz.I7E"
> procmail: Couldn't create "/var/spool/mail/baz"
> procmail: Renaming bogus mailbox "/var/spool/mail/baz" info "/var/spool/mail/BOGUS.baz.I7E"
> procmail: Couldn't create "/var/spool/mail/baz"
> 
> [baz@flux baz]$ tail -f proclog 
> procmail: Lock failure on "/.procmail.lock"
> >From baz Mon Aug 20 00:13:52 2001
>  Subject: [Sheflug] test
>   Folder: Sheflug							    391
> procmail: Lock failure on "/.procmail.lock"
> >From baz Mon Aug 20 00:14:05 2001
>  Subject: [wiltshire] test2
>   Folder: Wiltslug							    394
> procmail: Lock failure on "/.procmail.lock"
> >From baz Mon Aug 20 00:14:13 2001
>  Subject: random
>   Folder: Mailbox							    388
> procmail: Lock failure on "/.procmail.lock"
> >From baz Mon Aug 20 00:25:47 2001
>  Subject: [Sheflug] test!
>   Folder: Sheflug							    393
> 
> My system is set up with QMail, and it's associated Mailbox files.
> 
> /var/spool/mail/$USER is a symlink to $HOME/Mailbox.
> 
> I know that with certain setups procmail needs to be recompiled with a
> #define changed, but as far as I can see, every file I need is covered
> in the .procmailrc.
> 
> Any ideas anyone?
> 
> Cheers.
> 
> Baz.
> 
> >>>>> "Richard" == Richard Lowe <richlowe [at] richlowe.demon.co.uk> writes:
> 
>     Richard> * Barrie Bremner (baz [at] barriebremner.com) wrote:
>     >>  Hi All,
>     >> 
>     >> I've been having a look at a bunch of procmail FAQs and the
>     >> manpages, however I'm still unable to achieve anything.
> 
> 
>     Richard> the only way I can think to help is a very abbreviated
>     Richard> version of my .procmailrc: 
> 
>     [...]
> 
> -- 
> Barrie J. Bremner		OpenPGP public key ID: 5164F553
> baz [at] barriebremner.com	http://barriebremner.com/
> 
> 
> ___________________________________________________________________
> 
> Sheffield Linux User's Group - http://www.sheflug.co.uk . 
> To unsubscribe from this list send mail to 
> shef-lug-request [at] list.sheflug.org.uk with the word
> "unsubscribe" in the body of the message. 
> 
>   GNU the choice of a complete generation.
-- 
[ Richard Lowe - richlowe - richlowe [at] richlowe.demon.co.uk ]
[            http://www.snowman.net/~richlowe/            ]

___________________________________________________________________

Sheffield Linux User's Group - http://www.sheflug.co.uk . 
To unsubscribe from this list send mail to 
shef-lug-request@list.sheflug.org.uk with the word
"unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.