スプールを学ぶ

Xmailのディレクトリ構造が気になったので、スプール構造を調べてみた。READMEに詳細にかかれていたので、自分なりに一部翻訳してみる。

XMAIL SPOOL DESIGN
XMAIL スプールデザイン

    The new spool fs tree format has been designed to enable XMail to handle
    very large queues. Instead of having a single spool directory (like
    versions older than 0.61) a two layer deep splitting has been introduced
    so that its structure is:

    新しい fs ツリー形式はXmailで極端に長いキューを扱う為にデザインされた。
    一つのスプールディレクトを持つもの(Version. 0.61以前)に代わり、
    二層に深く分割する方法が用いられれている。
    その構造は次の通り。
    
     0   
       0   
         mess    
         rsnd    
         info    
         temp    
         slog    
         cust    
         froz    
       ...
     ...

    When XMail needs to create a new spool file a spool path is chosen in a
    random way and a new file with the format:

    Xmailが新しいスプールファイル・スプールパスを作る時は、ランダムに選ばれる。
    また、次のフォーマットを持つファイル:

     mstime.tid.seq.hostname

    is created inside the 'temp' subdirectory. When the spool file is ready
    to be committed, it's moved into the 'mess' subdirectory that holds
    newer spool files. If XMail fails sending a new message (the ones in
    mess subdirectory) it creates a log file (with the same name of the
    message file) inside the 'slog' subdirectory and move the file from
    'mess' to 'rsnd'. 
    
    が、 'temp" サブディレクトリ内に作成される。
    スプールファイルが処理される段階になったら、
    新しいスプールファイルを保持する、 'mess' サブディレクトリに移動される。
    もし、Xmailが新しいメッセージ('mess' サブディレクトリ内のファイル)
    を送ることに失敗すると、ログファイル(メッセージファイルと同じ名前)を
    'slog' サブディレクトリ内に作り、ファイルを'mess' から 'rsnd' に移動する。

    During the message sending the message itself is
    locked by creating a file inside the 'lock' subdirectory (with the same
    name of the message file). If the message has permanent delivery errors
    or is expired and if the option 'RemoveSpoolErrors' of the 'SERVER.TAB'
    file is off, the message file is moved into the 'froz' subdirectory.

    メッセージを送信している間、そのメッセージは 'lock'サブディレクトリ内に作成された
    (メッセージと同じ名前の)ファイルによりロックされる。
    もし、永久に配信がエラーとなる or 期限切れになる and 
    もし 'SERVER.TAB' ファイル内のオプション 'RemoveSpoolErrors'がオフだったら、
    メッセージは、 'froz' サブディレクトリに移動される