Mercurial > docs > diploma
comparison thesis/tex/4-MasqmailsFuture.tex @ 180:d75bd7a72d8b
wrote about IPC, drawed picture of new arch
author | meillo@marmaro.de |
---|---|
date | Sat, 27 Dec 2008 19:25:06 +0100 |
parents | b426a663d5f0 |
children | e35c7962d84f |
comparison
equal
deleted
inserted
replaced
179:7596cdcfbc1e | 180:d75bd7a72d8b |
---|---|
431 \name{Transport modules}, on the oppersite side of the system, are the modules to send outgoing mail; they are the interface between \name{queue-out} and remote hosts or local commands for further processing. The most popular ones are the \name{smtp} module (which acts as the \SMTP\ client) and the \name{pipe} module (to interface gateways to other systems or networks, like fax or uucp). A module for local delivery is not included, as it is in most other \MTA{}s; the reasons are described in FIXME.%fixme | 431 \name{Transport modules}, on the oppersite side of the system, are the modules to send outgoing mail; they are the interface between \name{queue-out} and remote hosts or local commands for further processing. The most popular ones are the \name{smtp} module (which acts as the \SMTP\ client) and the \name{pipe} module (to interface gateways to other systems or networks, like fax or uucp). A module for local delivery is not included, as it is in most other \MTA{}s; the reasons are described in FIXME.%fixme |
432 Thus a \name{mail delivery agent} (like \name{procmail}) is to be used with the \name{pipe} module. | 432 Thus a \name{mail delivery agent} (like \name{procmail}) is to be used with the \name{pipe} module. |
433 | 433 |
434 | 434 |
435 | 435 |
436 \subsection{Intermodule communication} | 436 \subsection{Inter-module communication} |
437 | |
438 Communication between modules is required to exchange data and status information. It is also called ``Inter-process communication'' (short: \NAME{IPC}), as modules are programs being part of a larger system, and processes are generally seen as programs in execution. | |
439 | |
440 The connections between \name{queue-in} and \name{scanning}, aswell as between \name{scanning} and \name{queue-out} is provided by the queues, only sending signals to trigger instant runs may be useful. Communication between receiving and transport modules and the outside world are done using the specific protocol they do handle. | |
441 | |
442 Left is only communication between the receiver modules and \name{queue-in}, and between \name{queue-out} and the transport modules. Data is exchanged done using \unix\ pipes and a simple protocol is used. | |
443 | |
444 \begin{figure} | |
445 \begin{center} | |
446 \input{input/ipc-protocol.tex} | |
447 \end{center} | |
448 \caption{State diagram of the protocol used for \NAME{IPC}} | |
449 \label{fig:ipc-protocol} | |
450 \end{figure} | |
451 | |
452 % timing | |
453 One dialog consists of the four phases: connection attempt, acceptance reply, data transfer, success reply. The order is always the same. The connection attempt and data transfer are sent by the client process; replies are sent by the server process. | |
454 | |
455 % semantics | |
456 The connection attempt is simply opening the connection. This starts the dialog. A positive reply by the server leads to the data transfer, but a negative reply refuses the connection and resets both client and server to the state before the connection attempt. If the connection attempt was accepted, the client sends the data ending with a terminator sequence. When this terminator appears, the server process knows the complete data was transfered. The server process takes responsibility of the data in sending a positive success reply. A negative success reply resets both client and server to the state before the connection attempt. | |
457 | |
458 The data transfered needs to be of specific format. Used is the same format in which messages are spooled in the mail queues. See the following section for details. %fixme: check if it is the following section | |
459 | |
460 % syntax | |
461 Data transfer is done sending plain text data. %fixme: utf8 ? | |
462 The terminator sequence used to indicate the end of the data transfer is a single dot on a line on its own. Line separators are the combination of \name{New Line} and \name{Carriage Return}, as it is used in various Internet protocols like \SMTP. Replys are one-digit numbers with \texttt{0} meaning success and any other number (\texttt{1}--\texttt{9}) indicate failure. %fixme: is it NL-CR or CR-NL? What are the octal values? | |
463 | |
464 Figure \ref{fig:ipc-protocol} is a state diagram for the protocol. | |
437 | 465 |
438 | 466 |
439 | 467 |
440 \subsection{Spool file format} | 468 \subsection{Spool file format} |
441 | 469 |
470 << talk about fanf >> | |
471 | |
472 << inode stuff of qmail >> | |
473 | |
474 << keep it simple! >> | |
475 | |
476 \begin{verbatim} | |
477 s f / envelope data | |
478 p i | NL | |
479 o l | / header lines | |
480 o e | mail | NL | |
481 l \ \ mail body | |
482 \end{verbatim} | |
483 | |
484 | |
442 | 485 |
443 \subsection{Rights and permission} | 486 \subsection{Rights and permission} |
444 | 487 |
445 | 488 setuid/setgid or not? |
489 | |
490 how many system users? | |
491 | |
492 what permission where? | |
493 | |
494 what can crash if an attacker succeeds? | |
495 | |
496 which process runs with what rights? | |
497 | |
498 where to drop privelege? | |
499 | |
500 how is which process invoked? | |
501 | |
502 master process? needed, or wanted? | |
503 | |
504 which are the daemon processes? | |
446 | 505 |
447 | 506 |
448 | 507 |
449 | 508 |
450 | 509 |