On Wed, 2007-08-29 at 11:16 -0700, JT Moree wrote:
> Guy Hulbert wrote:
> > There have been several adequate suggestions.  This is only a problem if
> > it goes into the qpsmtpd core since some of the suggestions are reported
> > to be in use already.
> how is this a problem.  those uses should still work even if we start

I think you answered this at the end.

> with the same variable because they would overwrite what is in core.
> The plugin maintainers can update as they have time.
> 
> good idea about the requirements.

Well if people restrict their input to the requirements it simplifies
things.

> 
> >     1. A unique ID per message (on one server).
> >     2. Ability to distinguish per recipient.
> >     3. Ability to identify the server.
        4. Well-defined format (e.g. UUID).
> 
> 2) per recipient or per message?  I don't see a way to make an id per
> recipient since any message can have multiple recipients.

There was a suggestion way back in the thread that this was required.  I
don't really know if it is required but it has been mentioned more than
once (by people besides me).

> 
> 3) which server are we talking about?

If you use syslog you can have all your logs in one place but if you are
running multiple mail servers then you might want to know which server
is responsible for a particular message ID.

> 
> > A sequence solves (1) except for simultaneous processing of
> <snip>
> > A counter solves 2.
> > 
> > Any tag which is unique per server solves 3.  It is probably simpler to
> > make this configurable by the end-user.
> 
> if A solves 1, B solves 2, and C solves 3 then A+B+C should solve all
> three and it's pretty simple to do so let's just do it.

I would just use either what Matt Seargent is using 

http://www.nntp.perl.org/group/perl.qpsmtpd/2007/08/msg7116.html

        Yeah, we use HiRes::time() . ".$$" and we don't get any file stomping  
        (and we're doing millions of emails/day).

or somthing like a UUID ... 

Here is an old UUID I have lying around:
        f9c31c2d-b3fb-0310-82b0-c4cdd2013627
so we can make it look something like that.

        use Time::HiRes qw( gettimeofday );
        print sprintf("%08x-%08x-%04x\n",gettimeofday,$$);

        46d5cf96-000045e3-3348

This, at least looks a bit like a UUID and can be extended with -%04x
formatted pieces.  As long as (2) and (3) are not needed, we are done.

I have to run now ...

> While letting the end user make changes is nice it defeats the purpose
> of putting a transaction ID into core where everyone can know and rely
> on it working the same way.

> 
-- 
--gh


Reply via email to