Re: [exim] Embedded perl

Top Page
Delete this message
Reply to this message
Author: Heiko Schlittermann
Date:  
To: exim-users
Subject: Re: [exim] Embedded perl
Hello Klaus,

please read the following statements only as guesswork, I didn't check
it with the source, it is just my understanding about what's going on
behind the scenes…

Klaus Ethgen <Klaus+exim@???> (Di 29 Nov 2011 16:52:34 CET):

> So my question ist, if it is sure that the same perl process is used for
> different queries in the same ACL (or over all ACL?) Or do I have to
> take care of mixed calls for different incoming mails in the same
> context?


A new process is used for every new connection. This new process should
be a fork(2) of the listener and this new process will evaluate the
ACL. This process will spool the message into the incoming/ directory
(if it passed the ACL) and this process then exec(2)s a fresh delivery
process.

Nobody can guarantee the number of messages the client will send you
down this single connection. But for *every* single message
the acl_smtp_mail needs to be passed first. And the acl_smtp_data needs
to be passed last. So you can use one of these acl to setup or clean
your cache.

> The documentation only mention perl_at_start but this parameter seems to
> be somewhat unuseful as it will started several times in several states
> of the daemon.


Normally the perl_start evaluation is delayed until the first perl
expansion is about to take place. If the code you execute in perl_start
needs the privileges, exim has at startup only, you need the
perl_at_start option.

--
Heiko