View previous topic :: View next topic |
Author |
Message |
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Fri Aug 20, 2004 1:47 pm Post subject: File name of message in maildir format |
|
|
Hi all,
The file names created in the maildir format have some special information or they are just made up so that they do not clash with one another?
Cheers, _________________ Paulo Matos |
|
Back to top |
|
|
devon l33t
Joined: 23 Jun 2003 Posts: 943
|
Posted: Fri Aug 20, 2004 4:54 pm Post subject: |
|
|
man maildir wrote: | A new unique filename is created using one of two possible forms: ``time.MusecPpid.host'', or
``time.MusecPpid_unique.host''. ``time'' and ``usec'' is the current system time, obtained from get-
timeofday(2). ``pid'' is the process number of the process that is delivering this message to the
maildir. ``host'' is the name of the machine where the mail is being delivered. In the event that the
same process creates multiple messages, a suffix unique to each message is appended to the process id;
preferrably an underscore, followed by an increasing counter. This applies whether messages created by a
process are all added to the same, or different, maildirs. This protocol allows multiple processes run-
ning on multiple machines on the same network to simultaneously create new messages without stomping on
each other.
The filename created in the previous step is checked for existence by executing the stat(2) system call.
If stat(2) results in ANYTHING OTHER than the system error ENOENT, the process must sleep for two sec-
onds, then go back and create another unique filename. This is an extra step to insure that each new
message has a completely unique filename.
|
|
|
Back to top |
|
|
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Fri Aug 20, 2004 5:06 pm Post subject: |
|
|
All the replies should be like this one... Clear, straight to the point and quoting an authority! Thanks!
devon wrote: | man maildir wrote: | A new unique filename is created using one of two possible forms: ``time.MusecPpid.host'', or
``time.MusecPpid_unique.host''. ``time'' and ``usec'' is the current system time, obtained from get-
timeofday(2). ``pid'' is the process number of the process that is delivering this message to the
maildir. ``host'' is the name of the machine where the mail is being delivered. In the event that the
same process creates multiple messages, a suffix unique to each message is appended to the process id;
preferrably an underscore, followed by an increasing counter. This applies whether messages created by a
process are all added to the same, or different, maildirs. This protocol allows multiple processes run-
ning on multiple machines on the same network to simultaneously create new messages without stomping on
each other.
The filename created in the previous step is checked for existence by executing the stat(2) system call.
If stat(2) results in ANYTHING OTHER than the system error ENOENT, the process must sleep for two sec-
onds, then go back and create another unique filename. This is an extra step to insure that each new
message has a completely unique filename.
|
|
_________________ Paulo Matos |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|