Submitter: Anne Bennett <firstname.lastname@example.org>
At line 198 in the original amavis-milter.c, you have:
stt = strchr(dirname, '-') + 1;
I suspect you meant:
stt = strrchr(dirname, '-') + 1;
to strip after the *last* dash, not the *first* one.
Using that method to generate temporary directory
I was getting /blah/blah/amavis-NNNNNNNN, instead of
/blah/blah/amavis-milter-NNNNNNNN, as expected from
the TEMPLATE. I suspect that if there had been a dash
in the runtime directory path, something rather
would have happened. The fix is in the patch below.
We found that mktemp did not give good results on our
very busy AlphaServer (running Tru64Unix): we kept
getting conflicting filenames. However, just setting
HAVE_MKTEMP to 0, and therefore using lrand48() to
generate a unique number, was not good either, since,
seems, the pseudo-random number generator had not been
seeded. We ended up using "tempnam". I append a patch
to amavis-milter.c which uses tempnam() if HAVE_TEMPNAM
is defined; I don't know how to change "configure" to
HAVE_TEMPNAM when appropriate.