% chaos seminar talk about masqmail
%
% markus schnalke <meillo@marmaro.de>
% since 2009-02-24


\documentclass{beamer}

\title{masqmail}
\author{markus schnalke}
\date{2009-03-09}

\usepackage[utf8]{inputenc}
\usepackage{url}
\usepackage{graphicx}
\setlength{\parskip}{2.0ex plus 1.0ex minus 0.5ex}

\newcommand{\secframe}[1]{
	\section{#1}
	\frame{ \vfill\vfill \centerline{ \huge #1 } \vfill }
}

\newcommand{\ft}[1]{
	\frametitle{#1}
}

\newcommand{\oneline}[1]{
	\frame{
		\vfill\vfill
		\centerline{#1}
		\vfill
	}
}



\begin{document}


\frame{

\vspace{8em}
\begin{center}

{\huge\bf masqmail}

a mail transfer agent for workstations and small networks

\vspace{6em}

{ \tiny
markus schnalke \textless{}meillo@marmaro.de\textgreater{}
}

\end{center}
}



\secframe{about me}


\frame{\ft{markus schnalke}

past:

\qquad Business Information Systems\\
\qquad at University of Applied Sciences, Ulm

\qquad Diploma Thesis about masqmail


future:

\qquad Master in Informatics\\
\qquad here at University, Ulm

}


\frame{\ft{I am interested in}

Unix Philosophy

suckless software

Free Software

Debian

}




\secframe{this talk}


\frame{ \ft{overview}

1) prerequisites (5\%) %3

2) about masqmail (25\%) %15

3) the thesis (60\%) %6 + 9 + 7 + 4 + 6 = 32

4) help wanted (10\%) %5

%== 55

}








\secframe{email? MTA? \dots}


\frame{\ft{What are MTAs}

MTA = Mail Transfer Agent

the post offices of email

MTAs transfer mail from senders to recipients

}


\frame{\ft{mail agents}

\begin{center}
\includegraphics[width=0.8\textwidth]{fig/mail-agents.eps}
\end{center}

}


\oneline{questions?}











\secframe{about masqmail}



\frame{ \ft{what is masqmail}

an MTA

a small one

one for special setups

}


\frame{ \ft{masqmail's niche}

non-permanent online connections

over multiple providers

especially for workstations and small networks

also notebooks

}


\frame{ \ft{history}

written by Oliver Kurth

1999 -- 2003

GPL

about 9\,000 lines of C

}


\frame{\ft{guessed}

initially written to use masqdialer-controlled online connections

thus: source of the name (``masq\dots'') (not ``\dots qmail'')

}



\frame{ \ft{masqmail today}

development stopped in 2003

not maintained

even its original website is down

but included in Debian, Ubuntu, Arch, Mandriva, FreeBSD

}


\frame{ \ft{value of masqmail}

covers a niche

has unique features

has users!

}


\frame{ \ft{problems of masqmail}

no further development

emailing has changed

unfixed bugs

}


\oneline{questions?}
















\secframe{when I met masqmail}


\frame{\ft{Fall 2007}

started to use masqmail

because of its small size

}

\frame{\ft{Spring 2008}

problem: realized it is unmaintained in Debian

A situation to be changed ... but by whom?

\dots me? No!

}


\frame{\ft{Summer 2008}

problem: find a topic for the diploma thesis

}


\frame{\ft{while lying in bed some night}

the great idea: solve both problems at once

1) \textbf{use the diploma thesis to revive masqmail}

2) \textbf{use masqmail to do a great diploma thesis}

}


\frame{\ft{advising professor}

professor Markus Sch\"affter

thanks!

}




\frame{\ft{logical decisions}

motivation:

\qquad for myself

\qquad for the community

thus:

\qquad write in English

\qquad make the thesis free available

}



\frame{\ft{guiding principle}

\begin{center}
\it
Do what you think is interesting,\\
do something that you think is fun and worthwhile,\\
because otherwise you won't do it well anyway.

---Brian~W.\ Kernighan---
\end{center}

}







\secframe{the thesis in short}



%\frame{\ft{planned was}
%
%1) purpose and structure of an MTA/of masqmail
%
%2) security analysis
%
%3) code improvements
%
%4) documentation, test, distribution
%
%With the goal to release a new version and get it into Debian
%
%}
%
%
%\frame{\ft{however, it resulted in}
%
%1) introduction
%
%2) market analysis
%
%3) mail transfer agents
%
%4) masqmail's present and future
%
%5) improvement plans
%
%Became pretty theoretic (I don't worry)
%
%}







\frame{ \ft{ch01: introduction}

general prerequisites

the masqmail project

value and problems of masqmail

\textbf{$\Rightarrow$ reasons to do this thesis}

}



\frame{ \ft{ch02: market analysis}

classification, life cycle, and trends of electronic communication

SWOT and trends for email

\textbf{$\Rightarrow$ show that email is expected to survive}

}


\frame{ \ft{ch03: mail transfer agents}

classification of MTAs

masqmail's competitors

short comparison

\textbf{$\Rightarrow$ provide knowledge for following chapters}

}




\frame{ \ft{ch04: masqmail's present and future}

the goal (revive masqmail)

requirements

\quad\quad fulfilled requirements

\quad\quad work to do

ways for further development

result

\textbf{$\Rightarrow$ the core of the thesis: a plan to revive masqmail}

}



\frame{ \ft{ch05: improvement plans}

more detailed descriptions of the work tasks

\textbf{$\Rightarrow$ recommendations how to do the proposed changes}

}


\oneline{questions?}






\oneline{\it we're half way through :-) }






\secframe{in detail: ch03 MTAs}



\frame{\ft{MTAs}

relay-only MTAs (forwarders):

\qquad nullmailer, ssmtp

groupware:

\qquad Lotus Notes, Exchange, opengroupware.org

``real'' MTAs:

\qquad sendmail, exim, qmail, postfix, masqmail

}



\frame{\ft{market shares}

\input{tbl/mta-market-share.tbl}

}



\frame{\ft{comparison}

\input{tbl/mta-comparison.tbl}

}



\frame{\ft{why not sendmail}

- too large

- too complex

- structurally insecure

- simply obsolete

}

\frame{\ft{why not exim}

- too large

- designed for always online hosts

}

\frame{\ft{why not qmail}

- outdated

- designed for always online hosts with fast connections

}

\frame{\ft{why not postfix}

- too large

- too complex

- not designed for masqmail's scenario

}

\frame{\ft{in summary}

- other MTAs are bad substitutes for masqmail

- though they seem to be generally able to be substitutes

}


\oneline{comments and annotations?}















\secframe{in detail: ch04 present and future}


\frame{\ft{functional requirements}

\input{tbl/func-requirements.tbl}

}

\frame{\ft{non-functional requirements}

\input{tbl/nonf-requirements.tbl}

}

\frame{\ft{work tasks}

TODO\,1: Encryption

TODO\,2: Authentication

TODO\,3: Security

TODO\,4: Reliability

TODO\,5: Spam handling

TODO\,6: Extendability


}


\frame{\ft{further development}

1) improve existing code

2) add wrappers and interposition filters

3) redesign and rewrite from scratch

\quad

$1) + 2) = 13$ \quad vs. \quad $3) = 17$

}


\frame{\ft{architecture}

\begin{center}
\includegraphics[width=0.8\textwidth]{fig/callgraph.eps}
\end{center}

}



\frame{\ft{the result}

``one fits all'' is not possible

hence: different strategies for different goals

short-term goal: keep masqmail usable\\
\qquad $\rightarrow$ improve existing code

long-term goal: make masqmail future-proof\\
\qquad $\rightarrow$ recreate it from scratch

disadvantage: more work

}


\oneline{questions?}







\secframe{in detail: ch05 (1) existing code}




\frame{\ft{TODO 1: Encryption}

STARTTLS

qmail patch as template

affected files: smtp\_in.c, smtp\_out.c, conf.c

}



\frame{\ft{TODO 2: Authentication}

static: TCP Wrapper

dynamic: SMTP-AUTH with SASL

affected files: smtp\_in.c, smtp\_out.c, conf.c

}



\frame{\ft{TODO 3: Security}

mail security layers

\begin{center}
\includegraphics[width=\textwidth]{fig/proxy-setup.eps}
\end{center}

}


\oneline{questions?}







\secframe{in detail: ch05 (2) new design}

\frame{\ft{design goals}

throughout compartmentalization

free internal system from in and out channels

single point for scanning

concentrate on mail transfer

keep it simple, clear, and general

}

\frame{\ft{incoming and outgoing}

in/out:

\qquad arbitrary protocol handlers (incoming/outgoing)

\qquad one queue-in module; one queue-out module

\qquad no own MDA, only a pipe module

route management:

\qquad the thing special to masqmail

\qquad done just before the outgoing modules

}


\frame{\ft{within the queue}

mail sanitizing:

\qquad qmail: ``don't parse'' $\rightarrow$ parse very carefully

\qquad Jon Postel's robustness principle

spool files:

\qquad preferably in the system's native format

}


\frame{\ft{auth, enc, spam}

auth and enc:

\qquad in receiving and sending modules (?)

\qquad with library code

spam and malware:

\qquad receiving modules vs. a scanning module

\qquad in both places?

\qquad malware scanning is not the MTA's job

}



\frame{\ft{the proposed architecture}

\begin{center}
\includegraphics[width=0.9\textwidth]{fig/masqmail-arch-new.eps}
\end{center}

}


\oneline{questions?}





\secframe{help wanted!}


\frame{\ft{work to do}

add encryption, authentication, security

fix bugs

documentation

user guides and ``marketing''

create the new masqmail

}


\frame{\ft{current team}

\tiny me

}


\frame{\ft{}

project site:

\qquad \url{http://prog.marmaro.de/masqmail}

mailing list:

\qquad masqmail@marmaro.de

}


\frame{\ft{Debian}

I search for a DD to sponsor my masqmail work

please contact me!

}


\frame{\ft{you!}

I welcome your help!

I appreciate your advice!

I am thankful for your comments!

\quad

\textbf{help masqmail}

}







\frame{
	\vfill\vfill
	\centerline{\textbf{Thanks for your attention}}
	\vfill
}


\frame{\ft{links}

\footnotesize

my diploma thesis\\
\qquad \url{http://marmaro.de/docs\#diploma}


masqmail's website\\
\qquad \url{http://prog.marmaro.de/masqmail}


masqmail mailing list\\
\qquad \url{masqmail@marmaro.de}\\
\qquad \url{minimalist@marmaro.de?subject=subscribe\%20masqmail}


suckless software\\
\qquad \url{http://www.suckless.org}


}




\frame{ \ft{software used}

Debian GNU/Linux

\LaTeX\ with the beamer classes

Vim, latexmk, and Mercurial

diagrams: PIC and groff

call graph: Egypt and dot

\vfill

{\scriptsize The slides are available on \url{http://marmaro.de/docs} \hfill 2009-03-09 }

}




\end{document}





\url{http://ulm.ccc.de/ChaosSeminar/2009/03_masqmail}
