diff options
| author | fukachan <fukachan> | 2003-08-02 01:19:10 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-08-02 01:19:10 +0000 |
| commit | 26f88d05d24fa845ab0c73f34cae9cf3d99cc91c (patch) | |
| tree | 92dbba47a718777b604351a2b5d9e301ff1b40fa /fml/doc/en/tutorial/delivery | |
| parent | 5988e8adb4ca1d9bde1ee065dfaf6b6141e2b98b (diff) | |
| download | fml8-26f88d05d24fa845ab0c73f34cae9cf3d99cc91c.tar.gz fml8-26f88d05d24fa845ab0c73f34cae9cf3d99cc91c.tar.bz2 fml8-26f88d05d24fa845ab0c73f34cae9cf3d99cc91c.zip | |
translated
Diffstat (limited to 'fml/doc/en/tutorial/delivery')
| -rw-r--r-- | fml/doc/en/tutorial/delivery/chapter.sgml | 125 | ||||
| -rw-r--r-- | fml/doc/en/tutorial/delivery/queue.sgml | 122 |
2 files changed, 247 insertions, 0 deletions
diff --git a/fml/doc/en/tutorial/delivery/chapter.sgml b/fml/doc/en/tutorial/delivery/chapter.sgml new file mode 100644 index 00000000..2b5cc36a --- /dev/null +++ b/fml/doc/en/tutorial/delivery/chapter.sgml @@ -0,0 +1,125 @@ +<!-- + $FML$ + $jaFML: chapter.sgml,v 1.12 2003/04/15 14:51:37 fukachan Exp $ +--> + +<chapter id="delivery"> + <TITLE> + &fmldevel; mail delivery system + </TITLE> + +<sect1 id="fmldevel-delivery"> + <title> + The difference between &fml4; and &fmldevel; + </title> + +<para> +One of puposes of &fmldevel; is unification and abstraction of member +list operations. Mail distribution is based on the following module +Mail::Delivery. +</para> + +<para> +Mail::Delivery class provides SMTP, ESMTP and LMTP delivery library +interface. Mail::Delivery is an adapter layer for Mail::Delivery +subclass ( SMTP ESMTP LMTP ). +</para> + +<para> +For example, +<screen> + use Mail::Delivery::SMTP; + my $service = new Mail::Delivery::SMTP; + if ($service->error) { Log($service->error); return;} + + $service->deliver( + { + mta => '127.0.0.1:25', + + smtp_sender => 'rudo@nuinui.net', + recipient_maps => $recipient_maps, + recipient_limit => 1000, + + mesage => $message + }); +</screen> +where $message is a +<link linkend="module.mail.message"> +Mail::Message +</link> +object. +</para> + +</sect1> + + +<sect1> + <title> + <link linkend="module.mail.message"> + Mail::Message + </link> + object + </title> + +<para> +This object provies message analyzer. +It analyzes a message and build the following object chains +<screen> +header -> body +header -> preamble -> part1 -> part2 -> trailor (multipart) +</screen> +</para> + +<para> +<link linkend="module.mail.message"> +Mail::Message +</link> +class provides such data structure described above. +</para> + +</sect1> + + +<!-- mail queue --> +§.mailqueue; + + +<sect1> + <title> + Discussion: FML::Mailer is apropriate ? + </title> + +<para> +Only FML::Process::QueueManager uses FML::Mailer. +So, independent FML::Mailer class is needed ? +</para> + +<para> +In usual codes, reply_message() handles all message operations. +FML::Mailer is always behind it. +But modules other than reply_message() is created in the future ? +Hmm, ... +</para> + +<para> +FML::Mailer should be merged into FML::Process::QueueManager class? +</para> + +</sect1> + + +<sect1 id="recipes.delivery"> + <title> + Delivery TIPS + </title> + +<qandaset> + +&recipe.delivery.forward; + +</qandaset> + +</sect1> + + +</chapter> diff --git a/fml/doc/en/tutorial/delivery/queue.sgml b/fml/doc/en/tutorial/delivery/queue.sgml new file mode 100644 index 00000000..5436ed46 --- /dev/null +++ b/fml/doc/en/tutorial/delivery/queue.sgml @@ -0,0 +1,122 @@ +<!-- + $FML$ + $jaFML: queue.sgml,v 1.3 2003/04/15 14:51:37 fukachan Exp $ +--> + +<sect1 id="message.reply"> + <TITLE> + fml sends back a mail message + </TITLE> + +<para> +Mail::Delivery::Queue class inserts a message to send back into the +mail queue. Later FML::Process::QueueManager handles the real delivery +process. +</para> + + +<sect2> + <title> + How to write + </title> + +<para> +use like this: +<screen> +$curproc->reply_message( "you are not a ML member." ); +</screen> +If no recipient specified, the recipient is the sender of the message +(From: address). +</para> + + +<para> +To send a file, like this: +<screen> +$curproc->reply_message( { + type => "text/plain; charset=iso-2022-jp", + path => "/etc/fml/main.cf", + filename => "main.cf", + disposition => "main.cf example", + }); + +$curproc->reply_message( { + type => "image/gif", + path => "/some/where/logo001.gif", + filename => "logo.gif", + disposition => "attachment", + }); +</screen> +</para> + +</sect2> + +</sect1> + + +<sect1 id="message.queue"> + <TITLE> + mail queue and delivery system + </TITLE> + +<para> +FML::Process::QueueManager pick up one queue from the queue directory. +Mail::Message parses it. +Mail::Delivery process the real delivery via FML::Mailer. +<screen> +Mail::Delivery::Queue + | + | ---> queue directory + V +FML::Process::QueueManager + | + | <--- queue directory + V +FML::Mailer + | + V +Mail::Delivery +</screen> +</para> + +</sect1> + + +<sect1> + <TITLE> + mail queue directory + </TITLE> + +<para> +The queue directory consists of the following plural directories: +<screen> +new/ +active/ +deferred/ +info/sender/ +info/recipients/ +</screen> +info/ stores envelope information +</para> + +<para> +In creating a new queue file, +make a temporary file in new/ once. +When the delivery preparation is ended, +move the queue from new/ to active/. +Hence files under active/ is delivery ready. +</para> + +<sect2> + <title> + lock the queue + </title> + +<para> +When we need to handle the specific queue file, +use lock()/unlock() method for each $queue_id object. +lock algorithm is based on flock(2) for the file. +</para> +</sect2> + +</sect1> |
