You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by RW <rw...@googlemail.com> on 2013/07/09 16:18:15 UTC

Perl regex compilation in spamd

I was wondering when perl REs are compiled in spamd. My understanding
is that perl compiles REs when they are first evaluated. Is anything
done to make this happen in the spamd parent? 

Re: Perl regex compilation in spamd

Posted by RW <rw...@googlemail.com>.
On Tue, 09 Jul 2013 11:41:09 -0400
Kevin A. McGrail wrote:

> On 7/9/2013 10:18 AM, RW wrote:
> > I was wondering when perl REs are compiled in spamd. My
> > understanding is that perl compiles REs when they are first
> > evaluated. Is anything done to make this happen in the spamd parent?
> To the best of my knowledge, Spamd must be restarted to reflect
> changed rules, compiled or otherwise.
> 

Yes, I know. What I was getting at is whether the REs are evaluated in
the parent process so child processes have them compiled after the
fork. If they aren't they would get compiled every time a child process
scans its first mail. Michael Parker answered this.

Even if you use sa-compile the majority of REs are still compiled by
perl not with re2cc+cc. 

Re: Perl regex compilation in spamd

Posted by Axb <ax...@gmail.com>.
On 07/09/2013 05:41 PM, Kevin A. McGrail wrote:
> On 7/9/2013 10:18 AM, RW wrote:
>> I was wondering when perl REs are compiled in spamd. My understanding
>> is that perl compiles REs when they are first evaluated. Is anything
>> done to make this happen in the spamd parent?
> To the best of my knowledge, Spamd must be restarted to reflect changed
> rules, compiled or otherwise.
>

FTR:

http://spamassassin.apache.org/full/3.3.x/doc/spamd.html sez:

Note: Although "spamd" will check per-user config files for every 
message, any changes to the system-wide config files will require either 
restarting spamd or forcing it to reload itself via SIGHUP for the 
changes to take effect.

Note: If "spamd" receives a SIGHUP , it internally reloads itself, which 
means that it will change its pid and might not restart at all if its 
environment changed (ie. if it can't change back into its own 
directory). If you plan to use SIGHUP , you should always start "spamd" 
with the -r switch to know its current pid.



Re: Perl regex compilation in spamd

Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 7/9/2013 10:18 AM, RW wrote:
> I was wondering when perl REs are compiled in spamd. My understanding
> is that perl compiles REs when they are first evaluated. Is anything
> done to make this happen in the spamd parent?
To the best of my knowledge, Spamd must be restarted to reflect changed 
rules, compiled or otherwise.


Re: Perl regex compilation in spamd

Posted by Michael Parker <pa...@herk.net>.
On Jul 9, 2013, at 9:18 AM, RW <rw...@googlemail.com> wrote:

> 
> I was wondering when perl REs are compiled in spamd. My understanding
> is that perl compiles REs when they are first evaluated. Is anything
> done to make this happen in the spamd parent? 

Yes, on startup a fake message is scanned to prime the pump and get everything loaded.

Michael