From: Ronald F. Guilmette (no email)
Date: Mon Sep 03 2007 - 15:19:04 EDT
In message <>,
(Wietse Venema) wrote:
>Ronald F. Guilmette:
>> Anyway, recently I got to wondering: Do milter programs that are
>> only going to be used in conjunction with Postfix (and _not_ any
>> other kind of mail server, e.g. Sendmail) really need to be thread-
>> safe?
>
>Yes, it needs to be thread safe. This means jumping hoops when
>you maintain persistent data structures, global variables. It
>also means you can't call functions that aren't thread safe.
Yes, that's what I thought it meant.
Ugg! I hate to have to do all of this extra work, just to write a
rather simple milter.
Just for the sake of my edification, could you please also tell me
_why_ a Postfix milter has to be thread safe? I mean Postfix's smtpd
processes don't actually _use_ separate threads, do they? So where
does the requirement come from? What would fail if I wrote a non-
thread-safe milter and tried to use it with Postfix? Would my data
structures that are updated/modified in a non-thread-safe way really
become corrupted? If so, how would that happen... even in the total
absence of multiple threads?
Signed,
Perplexed
|
|
|