Benoit Tellier created JAMES-4028:
-------------------------------------

             Summary: MailImpl derivation truncation might make diagnostic 
harder
                 Key: JAMES-4028
                 URL: https://issues.apache.org/jira/browse/JAMES-4028
             Project: James Server
          Issue Type: Improvement
            Reporter: Benoit Tellier


I was investigating a forward loop ( :-( ) and to my unplaisure, because mail 
names are limited to 86 characters, 

This caused the lopped email name not to be prefixed by the name of the 
original name:

{code:java}
 Mail1713173708159-16b6f285-e237-405f-800f-6a54926825e6-!5984740
      
713173708159-16b6f285-e237-405f-800f-6a54926825e6-!5984740-!9588184-!2870433
                        
285-e237-405f-800f-6a54926825e6-!5984740-!9588184-!2870433-!9660160-!4179738
                                          
-6a54926825e6-!5984740-!9588184-!2870433-!9660160-!4179738-!0418990-!8605805
{code}

Current rule: 
 - 4 char for 'Mail' prefix
 - 15 char for current unix timestamp
 - 1 char separator
 - 38 char uuid
 - up to 7 x 9 derivative suffix

Which means that truncation happens after 4 derivates.

By twikking slightly generation mechanisms we can get a more compact name that 
wouldn't get truncated to fir the 86 char rule.


 - 4 char for 'Mail' prefix
 - 15 char for current unix timestamp - to be kept as some people might use it 
as diagnostic information?
- 1 separator
 - Generate a 20 char random alphanumeric name. Entropy should be similar with 
the uuid
 - Rework each derivative suffix to be 5 char - use `!` as a demiiter and not 
`-!` and rely on alpha numeric for a more compact representation

That way truncation never happens, and I could filter easily by base email name 
onto my favorite mailing system to see the whole history without headache.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to