email Message-ID: What is a good algorithm to create this?

Aahz Maruch aahz at panix.com
Mon Apr 2 22:56:03 EDT 2001


In article <ltefctgnte58956letr44ah1n18la9bjor at 4ax.com>,
Sheila King  <sheila at spamcop.net> wrote:
>
>(2) For those without Sendmail access, it is possible to access a SMTP
>host and send it that way. However, in this case, it seems my script
>should generate the Message-IDs, as some SMTP servers will fill this in
>but others will not.

Say what?  I've never seen this.

>What is a good way for my script to generate Message-IDs? I know
>it usually has something to do with random numbers or strings, but
>I thought I would get some advice on how to do this, first, before
>blindly proceeding. A description of a general algorithm would be
>fine. Pointers to online resources describing such are also very
>welcome.

A Message-ID generally has the form 

    <"random" garbage>[e-mail address]@domain

(That is, some algorithms include the e-mail address and some don't.)
Probably the simplest solution is to use a combination of random number
plus time.time() (appended to each other as strings).
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"One World, One Web, One Program" - Microsoft Promotional Ad
"Ein Volk, Ein Reich, Ein Fuehrer" - Adolf Hitler
	We don't see a similarity. We really don't.



More information about the Python-list mailing list