You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by galili assaf <ga...@cs.bgu.ac.il> on 2006/01/23 18:51:40 UTC

question about .procmailrc

Hello all,
I am using spamassasin in .procmailrc (unix account).
my question is about .procmailrc:
is .procmailrc synchronized? I mean, if two new mails are coming to my accout, will the first .procmailrc script execution finish before the second execution will start?
I am trying to do something so the order is very importent.
Thank you,
Asi


Re: question about .procmailrc

Posted by jdow <jd...@earthlink.net>.
I followed up with a way to do that in a subsequent email. Braces work.

On the other hand for processing efficiency I'd be inclined to only lock
each spam filter rather than the whole set of three. I'd also make sure
the markup from one filter is not included in the input to subsequent
filters if anything like a Bayes filter is involved.

{^_^}
----- Original Message ----- 
From: "galili assaf" <ga...@cs.bgu.ac.il>


> Thank you for the fast reply,
> But I need somethig a little bit more complicated:
> I want to ensure the a whole .procmailrc execution will be completed before a next 
> begins.
> I am trying to do a small experiment : In my .procmailrc I call to 3 different 
> spamfilter, and then I write the results to a file. there for I must ensure execution 
> completion before another execution begin.
> Does anyone know how can I do it?
> Thank you,
> Asi
>
> On Mon 23 Jan 21:14 2006 jdow wrote:
>> From: "galili assaf" <ga...@cs.bgu.ac.il>
>>
>> > Hello all,
>> > I am using spamassasin in .procmailrc (unix account).
>> > my question is about .procmailrc:
>> > is .procmailrc synchronized? I mean, if two new mails are coming to my accout, will 
>> > the
>> > first .procmailrc script execution finish before the second execution will start?
>> > I am trying to do something so the order is very importent.
>> > Thank you,
>>
>> It is if you tell it to lock. If you are writing to a file then you do need
>> to "lock". If not then locking is not needed. You can name the locks or you
>> can use a generic lock. The man pages procmailrc and procmailex are good
>> friends here.
>>
>> Format for a named lock
>> :0c: clone.lock
>> $home/mail/clone
>>
>> Format for a generic lock
>> :0c:
>> $home/mail/clone
>>
>> Format for no lock
>> :0h
>> <stuff>
>>
>> And so forth
>> {^_^}
>
> 



Re: question about .procmailrc

Posted by galili assaf <ga...@cs.bgu.ac.il>.
Thank you for the fast reply,
But I need somethig a little bit more complicated:
I want to ensure the a whole .procmailrc execution will be completed before a next begins.
I am trying to do a small experiment : In my .procmailrc I call to 3 different spamfilter, and then I write the results to a file. there for I must ensure execution completion before another execution begin.
Does anyone know how can I do it?
Thank you,
Asi

On Mon 23 Jan 21:14 2006 jdow wrote:
> From: "galili assaf" <ga...@cs.bgu.ac.il>
> 
> > Hello all,
> > I am using spamassasin in .procmailrc (unix account).
> > my question is about .procmailrc:
> > is .procmailrc synchronized? I mean, if two new mails are coming to my accout, will the 
> > first .procmailrc script execution finish before the second execution will start?
> > I am trying to do something so the order is very importent.
> > Thank you,
> 
> It is if you tell it to lock. If you are writing to a file then you do need
> to "lock". If not then locking is not needed. You can name the locks or you
> can use a generic lock. The man pages procmailrc and procmailex are good
> friends here.
> 
> Format for a named lock
> :0c: clone.lock
> $home/mail/clone
> 
> Format for a generic lock
> :0c:
> $home/mail/clone
> 
> Format for no lock
> :0h
> <stuff>
> 
> And so forth
> {^_^}




Re: question about .procmailrc

Posted by jdow <jd...@earthlink.net>.
From: "galili assaf" <ga...@cs.bgu.ac.il>

> Hello all,
> I am using spamassasin in .procmailrc (unix account).
> my question is about .procmailrc:
> is .procmailrc synchronized? I mean, if two new mails are coming to my accout, will the 
> first .procmailrc script execution finish before the second execution will start?
> I am trying to do something so the order is very importent.
> Thank you,

It is if you tell it to lock. If you are writing to a file then you do need
to "lock". If not then locking is not needed. You can name the locks or you
can use a generic lock. The man pages procmailrc and procmailex are good
friends here.

Format for a named lock
:0c: clone.lock
$home/mail/clone

Format for a generic lock
:0c:
$home/mail/clone

Format for no lock
:0h
<stuff>

And so forth
{^_^} 



Re: question about .procmailrc

Posted by jdow <jd...@earthlink.net>.
:0: general.lock
* < 500000
{
    # All email <= 500k goes through these rules.
    # The rest of your procmail rules go here.
    :0c: clone.lock
    $home/mail/clone
    # etc
}

{^_^}
----- Original Message ----- 
From: "galili assaf" <ga...@cs.bgu.ac.il>


> Thank you for the fast reply,
> But I need somethig a little bit more complicated:
> I want to ensure the a whole .procmailrc execution will be completed before a next 
> begins.
> I am trying to do a small experiment : In my .procmailrc I call to 3 different 
> spamfilter, and then I write the results to a file. there for I must ensure execution 
> completion before another execution begin.
> Does anyone know how can I do it?
> Thank you,
> Asi
>
> On Mon 23 Jan 19:58 2006 Mike Jackson wrote:
>> > I am using spamassasin in .procmailrc (unix account).
>> > my question is about .procmailrc:
>> > is .procmailrc synchronized? I mean, if two new mails are coming to my
>> > accout, will the first .procmailrc script execution finish before the
>> > second execution will start?
>> > I am trying to do something so the order is very importent.
>>
>> This seems more like a question for a procmail mailing list than this one,
>> but oh well. procmail executes once for each message it processes, so you
>> could have more than one procmail process running concurrently. If you are
>> concerned that one action is finished before the next begins, use file
>> locking. For instance, here's an entry from my file where I execute ClamAV:
>>
>> :0fw: clamailfilter.lock
>> | /usr/local/bin/clamscan-procfilter
>>
>> That way, even if more than one procmail process is running, ClamAV will
>> only be running for one of them at a time.
>
> 



Re: question about .procmailrc

Posted by galili assaf <ga...@cs.bgu.ac.il>.
Thank you for the fast reply,
But I need somethig a little bit more complicated:
I want to ensure the a whole .procmailrc execution will be completed before a next begins.
I am trying to do a small experiment : In my .procmailrc I call to 3 different spamfilter, and then I write the results to a file. there for I must ensure execution completion before another execution begin.
Does anyone know how can I do it?
Thank you,
Asi

On Mon 23 Jan 19:58 2006 Mike Jackson wrote:
> > I am using spamassasin in .procmailrc (unix account).
> > my question is about .procmailrc:
> > is .procmailrc synchronized? I mean, if two new mails are coming to my 
> > accout, will the first .procmailrc script execution finish before the 
> > second execution will start?
> > I am trying to do something so the order is very importent.
> 
> This seems more like a question for a procmail mailing list than this one, 
> but oh well. procmail executes once for each message it processes, so you 
> could have more than one procmail process running concurrently. If you are 
> concerned that one action is finished before the next begins, use file 
> locking. For instance, here's an entry from my file where I execute ClamAV:
> 
> :0fw: clamailfilter.lock
> | /usr/local/bin/clamscan-procfilter
> 
> That way, even if more than one procmail process is running, ClamAV will 
> only be running for one of them at a time.




Re: question about .procmailrc

Posted by Mike Jackson <mj...@barking-dog.net>.
> I am using spamassasin in .procmailrc (unix account).
> my question is about .procmailrc:
> is .procmailrc synchronized? I mean, if two new mails are coming to my 
> accout, will the first .procmailrc script execution finish before the 
> second execution will start?
> I am trying to do something so the order is very importent.

This seems more like a question for a procmail mailing list than this one, 
but oh well. procmail executes once for each message it processes, so you 
could have more than one procmail process running concurrently. If you are 
concerned that one action is finished before the next begins, use file 
locking. For instance, here's an entry from my file where I execute ClamAV:

:0fw: clamailfilter.lock
| /usr/local/bin/clamscan-procfilter

That way, even if more than one procmail process is running, ClamAV will 
only be running for one of them at a time.