[Exim] Multiple exim daemons

Top Page
Delete this message
Reply to this message
Author: Gary Palmer
Date:  
To: exim-users
Subject: [Exim] Multiple exim daemons
Hi,

For listening on the submission port (and other projects), I'm
wondering if its safe to use multiple exim processes accessing the
same spool directory. The reason I believe its safe is the way exim
does locking, and the way it generates message-id's, I don't believe
there is going to be a conflict. The code says about message-id
generation:

/* Now build the unique message id. From smail we copy the idea of using the
current time in base-62 format. Smail adds to this the inode of the data file,
but on fast processors this isn't good enough, because a message can be
completely handled within one second, and another can then arrive and get the
same inode and therefore the same message id. Instead we use the pid of this
process plus a sequence number which gets reset when the time changes, because
a single process is capable of receiving more than one message - indeed, an
SMTP connection might stay for quite some time. Uniqueness now relies on the
fact that process numbers operate on a fairly large cycle, so that it is
unbelievably unlikely that a process could receive a message, finish, and
another process with the same pid could be started to receive another message,
all within the same second.

Since the PID and the time are in there, I doubt very VERY much that
the entire PID space can be cycled through in one second. Any other
gotchas I should be aware of? I'm smart enough to only have -q <time>
specified on one of the daemons :)

Thanks,

Gary