[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SMTP server id generation uniqueness ?



On Thu, Jun 22, 2006 at 01:36:44PM +0100, Darryl L. Miles wrote:
> It is allowed and valid for two messages to get the same SMTP generated 
> id ?  In this case 'S263499AbWFUJtA', I just wanted to confirm that the 
> id is simply a reference token to co-ordinating logged data and not 
> something the mail system uses internally and expects to be unique.
> 
> Here are two session, with extra spaces added to show them overlapping 
> better that generated the same SMTP id.

  The spool-id is made of file i-node number plus st_mtime
  timestamp.

  These logged sessions have started at about the same second
  ("UJs") so they are well within 1 second of each other.

  All that is then needed is that first message goes thru the
  router + scheduler + delivery before next one begins arriving,
  and thus can get same i-node number (263499) at file-open,
  and that wall-clock is still within same second when second
  file's final fsync() (or whatever last modified the file) was done.

  I do suspect that the middle-session there has had more lines
  in front of it and after preceding session's "accepted"  msg.
  Right now the smtpserver  create(2)s the spool-file when it
  gets  MAIL FROM transaction, and the previous message had
  to get thru before second one can have same i-node number..
  (This is the BIG assumption in UNIX filesystems...)


  This way of making spool-id (for log session tracking) is
   - stateless
   - uses only filesystem-wide unique persistent data
   - is lightweight for the system



> UJs4Agd0004w    250 2.0.0 accepted; S263499AbWFUJtA
> UJs4Agd0004#    000-S263499AbWFUJtA: 14320 bytes
> 
> UJszAgg0005w    250 2.1.0 Sender syntax Ok;
> UJszAgg0005#    000--- pipeline input exists 6 bytes
> UJszAgg0005r    RCPT TO:<uuuu@ddddddddddddddd.ddd>
> UJszAgg0005w    250 2.1.5 Ok; can accomodate 7236 byte message for <uuuu@dddddddddddd.ddd>
> UJszAgg0005r    DATA
> UJszAgg0005w    354 Start mail input; end with <CRLF>.<CRLF>
> UJszAgg0005w    250 2.0.0 accepted; S263499AbWFUJtA
> UJszAgg0005#    000-S263499AbWFUJtA: 6850 bytes
> UJszAgg0005r    QUIT
> 
> UJs4Agd0004#    000-Session closed w/o QUIT; read() errno=0
> 
> 
> This is also an interesting SPAM approach, the not sending a QUIT.  Hmm 
> how many legitimate SMTP clients do that ?  One red star to you Mr.

  Wasn't  qmail  an example of MTA that just closes the stream without
  sending QUIT verb ?

 
> -- 
> Darryl L. Miles

-- 
/Matti Aarnio	<mea@nic.funet.fi>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi