Dave Evans replied:
> > It's greylisting without database. I'm rewriting it from Perl
> > http://wiki.exim.org/DbLessGreyListing to C (using ${dlfunc )
> > and intend to publish it there, but may be I should describe also
> > the ${run variant? Because compiling for ${dlfunc looks not too trivial,
> > and I enough well know only my OS (FreeBSD).
> > How do you think, what is more expensive: one ${perl call
> > or three ${run calls (find -exec mv, find -delete, touch)?
>
> More expensive it terms of what?
For me memory is more important because I run Exim on VPS/VDS with
64M RAM (not counting kernel) and 128M swap along with BIND,
a web-server with Perl CGI and inetd (sshd, popa3d).
But my question is more general/vague because I'll need
to explain for other users who can have other priorities.
> For CPU and elapsed run-time, ${run is almost certainly more expensive (three
> forks, three "exec"s, plus the work to actually manipulate the files).
> However, ${perl will be more expensive in terms of persistent memory usage.
In both cases the processing (one ${perl or three ${run )
happens at first RCPT, i.e. soon after beginning of some
"handling incoming connection" Exim processes once per connection.
The work to actually manipulate the files is the same in both cases.
So, each ${perl call means Perl initialization and
compilation of modules (IO::File, File::Path, Data::Dumper, Time::HiRes).
I think that Perl initialized in the parent (daemon, listening) Exim process
(by means of perl_at_start) cannot be used without initialization again
in child (handling incoming connections) processes. Or am I wrong?