git » chasquid » commit 24af22a

docs: Add man pages

author Alberto Bertogli
2018-04-02 00:40:44 UTC
committer Alberto Bertogli
2018-04-04 20:26:02 UTC
parent 4e2e3785d2306e1a15ec4477fb8b6f1f34414a66

docs: Add man pages

This patch adds man pages for chasquid's main commands and
configuration. They are generated using pod2man (commonly used for this,
and included with perl in most distributions).

The generated man pages are included to avoid introducing a dependency
for such simple task, similar to how we handle protocol buffer generated
files.

docs/man/chasquid-util.1 +180 -0
docs/man/chasquid-util.1.pod +61 -0
docs/man/chasquid.1 +222 -0
docs/man/chasquid.1.pod +120 -0
docs/man/chasquid.conf.5 +219 -0
docs/man/chasquid.conf.5.pod +102 -0
docs/man/generate.sh +19 -0
docs/man/mda-lmtp.1 +186 -0
docs/man/mda-lmtp.1.pod +73 -0
docs/man/smtp-check.1 +156 -0
docs/man/smtp-check.1.pod +31 -0

diff --git a/docs/man/chasquid-util.1 b/docs/man/chasquid-util.1
new file mode 100644
index 0000000..47e002a
--- /dev/null
+++ b/docs/man/chasquid-util.1
@@ -0,0 +1,180 @@
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "chasquid-util 1"
+.TH chasquid-util 1 "2018-04-03" "" ""
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+chasquid\-util \- chasquid management tool
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBchasquid-util\fR [\fIoptions\fR] user-add \fIuser@domain\fR [\-\-password=\fIpassword\fR]
+.PP
+\&\fBchasquid-util\fR [\fIoptions\fR] user-remove \fIuser@domain\fR
+.PP
+\&\fBchasquid-util\fR [\fIoptions\fR] authenticate \fIuser@domain\fR [\-\-password=\fIpassword\fR]
+.PP
+\&\fBchasquid-util\fR [\fIoptions\fR] check-userdb \fIdomain\fR
+.PP
+\&\fBchasquid-util\fR [\fIoptions\fR] aliases-resolve \fIaddr\fR
+.PP
+\&\fBchasquid-util\fR [\fIoptions\fR] print-config
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+chasquid-util is a command-line utility for \fIchasquid\fR\|(1) operations.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fBuser-add\fR \fIuser@domain\fR [\-\-password=\fIpassword\fR]" 8
+.IX Item "user-add user@domain [--password=password]"
+Add a new user to the domain.
+.IP "\fBuser-remove\fR \fIuser@domain\fR" 8
+.IX Item "user-remove user@domain"
+Remove the user from the domain.
+.IP "\fBauthenticate\fR \fIuser@domain\fR [\-\-password=\fIpassword\fR]" 8
+.IX Item "authenticate user@domain [--password=password]"
+Check the user's password.
+.IP "\fBcheck-userdb\fR \fIdomain\fR" 8
+.IX Item "check-userdb domain"
+Check the integrity of the domain's users database.
+.IP "\fBaliases-resolve\fR \fIaddr\fR" 8
+.IX Item "aliases-resolve addr"
+Resolve the given address.
+.IP "\fBprint-config\fR" 8
+.IX Item "print-config"
+Parse and print the configuration in a human-readable way.
+.IP "\fB\-C\fR or \fB\-\-configdir=<path\fR>" 8
+.IX Item "-C or --configdir=<path>"
+Configuration directory.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIchasquid\fR\|(1)
diff --git a/docs/man/chasquid-util.1.pod b/docs/man/chasquid-util.1.pod
new file mode 100644
index 0000000..6825a1d
--- /dev/null
+++ b/docs/man/chasquid-util.1.pod
@@ -0,0 +1,61 @@
+=head1 NAME
+
+chasquid-util - chasquid management tool
+
+
+=head1 SYNOPSIS
+
+B<chasquid-util> [I<options>] user-add I<user@domain> [--password=I<password>]
+
+B<chasquid-util> [I<options>] user-remove I<user@domain>
+
+B<chasquid-util> [I<options>] authenticate I<user@domain> [--password=I<password>]
+
+B<chasquid-util> [I<options>] check-userdb I<domain>
+
+B<chasquid-util> [I<options>] aliases-resolve I<addr>
+
+B<chasquid-util> [I<options>] print-config
+
+
+=head1 DESCRIPTION
+
+chasquid-util is a command-line utility for chasquid(1) operations.
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<user-add> I<user@domain> [--password=I<password>]
+
+Add a new user to the domain.
+
+=item B<user-remove> I<user@domain>
+
+Remove the user from the domain.
+
+=item B<authenticate> I<user@domain> [--password=I<password>]
+
+Check the user's password.
+
+=item B<check-userdb> I<domain>
+
+Check the integrity of the domain's users database.
+
+=item B<aliases-resolve> I<addr>
+
+Resolve the given address.
+
+=item B<print-config>
+
+Parse and print the configuration in a human-readable way.
+
+=item B<-C> or B<--configdir=<path>>
+
+Configuration directory.
+
+=back
+
+=head1 SEE ALSO
+
+chasquid(1)
diff --git a/docs/man/chasquid.1 b/docs/man/chasquid.1
new file mode 100644
index 0000000..b213d7d
--- /dev/null
+++ b/docs/man/chasquid.1
@@ -0,0 +1,222 @@
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "chasquid 1"
+.TH chasquid 1 "2018-04-02" "" ""
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+chasquid \- SMTP (email) server
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBchasquid\fR [\fIoptions\fR...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+chasquid is an \s-1SMTP\s0 (email) server.
+.PP
+It aims to be easy to configure and maintain for a small mail server, at the
+expense of flexibility and functionality.
+.PP
+It's written in Go, and distributed under the Apache license 2.0.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-config_dir\fR \fIdir\fR" 8
+.IX Item "-config_dir dir"
+configuration directory (default \fI/etc/chasquid\fR)
+.IP "\fB\-alsologtostderr\fR" 8
+.IX Item "-alsologtostderr"
+also log to stderr, in addition to the file
+.IP "\fB\-logfile\fR \fIfile\fR" 8
+.IX Item "-logfile file"
+file to log to (enables logtime)
+.IP "\fB\-logtime\fR" 8
+.IX Item "-logtime"
+include the time when writing the log to stderr
+.IP "\fB\-logtosyslog\fR \fItag\fR" 8
+.IX Item "-logtosyslog tag"
+log to syslog, with the given tag
+.IP "\fB\-v\fR \fIlevel\fR" 8
+.IX Item "-v level"
+verbosity level (1 = debug)
+.IP "\fB\-version\fR" 8
+.IX Item "-version"
+show version and exit
+.SH "FILES"
+.IX Header "FILES"
+The daemon's configuration is by default in \fI/etc/chasquid/\fR, and can be
+changed with the \fI\-config_dir\fR flag.
+.PP
+Inside that directory, the daemon expects the following structure:
+.IP "\fIchasquid.conf\fR" 8
+.IX Item "chasquid.conf"
+Main config file, see \fIchasquid.conf\fR\|(5).
+.IP "\fIdomains/\fR" 8
+.IX Item "domains/"
+Per-domain configuration.
+.IP "\fIdomains/example.com/\fR" 8
+.IX Item "domains/example.com/"
+Domain-specific configuration. Can be empty.
+.IP "\fIdomains/example.com/users\fR" 8
+.IX Item "domains/example.com/users"
+User and password database for this domain.
+.IP "\fIdomains/example.com/aliases\fR" 8
+.IX Item "domains/example.com/aliases"
+Aliases for the domain.
+.IP "\fIcerts/\fR" 8
+.IX Item "certs/"
+Certificates to use, one directory per pair.
+.IP "\fIcerts/mx.example.com/\fR" 8
+.IX Item "certs/mx.example.com/"
+Certificates for this domain.
+.IP "\fIcerts/mx.example.com/fullchain.pem\fR" 8
+.IX Item "certs/mx.example.com/fullchain.pem"
+Certificate (full chain).
+.IP "\fIcerts/mx.example.com/privkey.pem\fR" 8
+.IX Item "certs/mx.example.com/privkey.pem"
+Private key.
+.PP
+Note the \fIcerts/\fR directory layout matches the one from \fIcertbot\fR\|(1) (client for
+Let's Encrypt \s-1CA\s0), so you can just symlink \fIcerts/\fR to
+\&\fI/etc/letsencrypt/live\fR.
+.PP
+Make sure the user you use to run chasquid under (\*(L"mail\*(R" in the example
+config) can access the certificates and private keys.
+.SH "CONTACT"
+.IX Header "CONTACT"
+Main website <https://blitiri.com.ar/p/chasquid>.
+.PP
+If you have any questions, comments or patches please send them to the mailing
+list, \f(CW\*(C`chasquid@googlegroups.com\*(C'\fR.  To subscribe, send an email to
+\&\f(CW\*(C`chasquid+subscribe@googlegroups.com\*(C'\fR.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIchasquid\-util\fR\|(1), \fIchasquid.conf\fR\|(5)
diff --git a/docs/man/chasquid.1.pod b/docs/man/chasquid.1.pod
new file mode 100644
index 0000000..ee9909e
--- /dev/null
+++ b/docs/man/chasquid.1.pod
@@ -0,0 +1,120 @@
+=head1 NAME
+
+chasquid - SMTP (email) server
+
+=head1 SYNOPSIS
+
+B<chasquid> [I<options>...]
+
+=head1 DESCRIPTION
+
+chasquid is an SMTP (email) server.
+
+It aims to be easy to configure and maintain for a small mail server, at the
+expense of flexibility and functionality.
+
+It's written in Go, and distributed under the Apache license 2.0.
+
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-config_dir> I<dir>
+
+configuration directory (default F</etc/chasquid>)
+
+=item B<-alsologtostderr>
+
+also log to stderr, in addition to the file
+
+=item B<-logfile> I<file>
+
+file to log to (enables logtime)
+
+=item B<-logtime>
+
+include the time when writing the log to stderr
+
+=item B<-logtosyslog> I<tag>
+
+log to syslog, with the given tag
+
+=item B<-v> I<level>
+
+verbosity level (1 = debug)
+
+=item B<-version>
+
+show version and exit
+
+=back
+
+
+=head1 FILES
+
+The daemon's configuration is by default in F</etc/chasquid/>, and can be
+changed with the I<-config_dir> flag.
+
+Inside that directory, the daemon expects the following structure:
+
+=over 8
+
+=item F<chasquid.conf>
+
+Main config file, see chasquid.conf(5).
+
+=item F<domains/>
+
+Per-domain configuration.
+
+=item F<domains/example.com/>
+
+Domain-specific configuration. Can be empty.
+
+=item F<domains/example.com/users>
+
+User and password database for this domain.
+
+=item F<domains/example.com/aliases>
+
+Aliases for the domain.
+
+=item F<certs/>
+
+Certificates to use, one directory per pair.
+
+=item F<certs/mx.example.com/>
+
+Certificates for this domain.
+
+=item F<certs/mx.example.com/fullchain.pem>
+
+Certificate (full chain).
+
+=item F<certs/mx.example.com/privkey.pem>
+
+Private key.
+
+=back
+
+Note the F<certs/> directory layout matches the one from certbot(1) (client for
+Let's Encrypt CA), so you can just symlink F<certs/> to
+F</etc/letsencrypt/live>.
+
+Make sure the user you use to run chasquid under ("mail" in the example
+config) can access the certificates and private keys.
+
+
+=head1 CONTACT
+
+L<Main website|https://blitiri.com.ar/p/chasquid>.
+
+If you have any questions, comments or patches please send them to the mailing
+list, C<chasquid@googlegroups.com>.  To subscribe, send an email to
+C<chasquid+subscribe@googlegroups.com>.
+
+
+=head1 SEE ALSO
+
+chasquid-util(1), chasquid.conf(5)
diff --git a/docs/man/chasquid.conf.5 b/docs/man/chasquid.conf.5
new file mode 100644
index 0000000..b8176dc
--- /dev/null
+++ b/docs/man/chasquid.conf.5
@@ -0,0 +1,219 @@
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "chasquid.conf 5"
+.TH chasquid.conf 5 "2018-04-03" "" ""
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+chasquid.conf(5) \-\- chasquid configuration file
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fIchasquid.conf\fR\|(5) is \fIchasquid\fR\|(1)'s main configuration file.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The file is in protocol buffers' text format.
+.PP
+Comments start with \f(CW\*(C`#\*(C'\fR. Empty lines are allowed.  Values are of the form
+\&\f(CW\*(C`key: value\*(C'\fR. Values can be strings (quoted), integers, or booleans (\f(CW\*(C`true\*(C'\fR or
+\&\f(CW\*(C`false\*(C'\fR).
+.PP
+Some values might be repeated, for example the listening addresses.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fBhostname\fR (string):" 8
+.IX Item "hostname (string):"
+Default hostname to use when saying hello. This is used to say hello to
+clients, for aesthetic purposes. Default: the system's hostname.
+.IP "\fBmax_data_size_mb\fR (int):" 8
+.IX Item "max_data_size_mb (int):"
+Maximum email size, in megabytes. Default: 50.
+.IP "\fBsmtp_address\fR (repeated string):" 8
+.IX Item "smtp_address (repeated string):"
+Addresses to listen on for \s-1SMTP.\s0 Default: \*(L"systemd\*(R", which means systemd
+passes sockets to us. systemd sockets must be named with
+\&\fBFileDescriptorName=smtp\fR.
+.IP "\fBsubmission_address\fR (repeated string):" 8
+.IX Item "submission_address (repeated string):"
+Addresses to listen on for submission. Default: \*(L"systemd\*(R", which means
+systemd passes sockets to us. systemd sockets must be named with
+\&\fBFileDescriptorName=submission\fR.
+.IP "\fBmonitoring_address\fR (string):" 8
+.IX Item "monitoring_address (string):"
+Address for the monitoring \s-1HTTP\s0 server. Do \s-1NOT\s0 expose this to the public
+internet. Default: no monitoring server.
+.IP "\fBmail_delivery_agent_bin\fR (string):" 8
+.IX Item "mail_delivery_agent_bin (string):"
+Mail delivery agent (\s-1MDA,\s0 also known as \s-1LDA\s0) to use. This should point
+to the binary to use to deliver email to local users. The content of the
+email will be passed via stdin. If it exits unsuccessfully, we assume
+the mail was not delivered. Default: \fImaildrop\fR.
+.IP "\fBmail_delivery_agent_args\fR (repeated string):" 8
+.IX Item "mail_delivery_agent_args (repeated string):"
+Command line arguments for the mail delivery agent. One per argument.
+Some replacements will be done.
+.Sp
+On an email sent from marsnik@mars to venera@venus:
+.Sp
+.Vb 6
+\&    %from%        \-> from address (marsnik@mars)
+\&    %from_user%   \-> from user (marsnik)
+\&    %from_domain% \-> from domain (mars)
+\&    %to%          \-> to address (venera@venus)
+\&    %to_user%     \-> to user (venera)
+\&    %to_domain%   \-> to domain (venus)
+.Ve
+.Sp
+Default: \f(CW"\-f", "%from%", "\-d", "%to_user%"\fR  (adequate for procmail and
+maildrop).
+.IP "\fBdata_dir\fR (string):" 8
+.IX Item "data_dir (string):"
+Directory where we store our persistent data. Default:
+\&\fI/var/lib/chasquid\fR.
+.IP "\fBsuffix_separators\fR (string):" 8
+.IX Item "suffix_separators (string):"
+Suffix separator, to perform suffix removal of local users.  For
+example, if you set this to \f(CW\*(C`\-+\*(C'\fR, email to local user \f(CW\*(C`user\-blah\*(C'\fR and
+\&\f(CW\*(C`user+blah\*(C'\fR will be delivered to \f(CW\*(C`user\*(C'\fR.  Including \f(CW\*(C`+\*(C'\fR is strongly
+encouraged, as it is assumed for email forwarding.  Default: \f(CW\*(C`+\*(C'\fR.
+.IP "\fBdrop_characters\fR (string):" 8
+.IX Item "drop_characters (string):"
+Characters to drop from the user part on local emails.  For example, if
+you set this to \f(CW\*(C`._\*(C'\fR, email to local user \f(CW\*(C`u.se_r\*(C'\fR will be delivered to
+\&\f(CW\*(C`user\*(C'\fR.  Default: \f(CW\*(C`.\*(C'\fR.
+.IP "\fBmail_log_path\fR (string):" 8
+.IX Item "mail_log_path (string):"
+Path where to write the mail log to.  If \f(CW\*(C`<syslog>\*(C'\fR, log using the
+syslog (at \f(CW\*(C`MAIL|INFO\*(C'\fR priority).  Default: \f(CW\*(C`<syslog>\*(C'\fR.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIchasquid\fR\|(1)
diff --git a/docs/man/chasquid.conf.5.pod b/docs/man/chasquid.conf.5.pod
new file mode 100644
index 0000000..c2a2b16
--- /dev/null
+++ b/docs/man/chasquid.conf.5.pod
@@ -0,0 +1,102 @@
+=head1 NAME
+
+chasquid.conf(5) -- chasquid configuration file
+
+=head1 SYNOPSIS
+
+chasquid.conf(5) is chasquid(1)'s main configuration file.
+
+
+=head1 DESCRIPTION
+
+The file is in protocol buffers' text format.
+
+Comments start with C<#>. Empty lines are allowed.  Values are of the form
+C<key: value>. Values can be strings (quoted), integers, or booleans (C<true> or
+C<false>).
+
+Some values might be repeated, for example the listening addresses.
+
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<hostname> (string):
+
+Default hostname to use when saying hello. This is used to say hello to
+clients, for aesthetic purposes. Default: the system's hostname.
+
+=item B<max_data_size_mb> (int):
+
+Maximum email size, in megabytes. Default: 50.
+
+=item B<smtp_address> (repeated string):
+
+Addresses to listen on for SMTP. Default: "systemd", which means systemd
+passes sockets to us. systemd sockets must be named with
+B<FileDescriptorName=smtp>.
+
+=item B<submission_address> (repeated string):
+
+Addresses to listen on for submission. Default: "systemd", which means
+systemd passes sockets to us. systemd sockets must be named with
+B<FileDescriptorName=submission>.
+
+=item B<monitoring_address> (string):
+
+Address for the monitoring HTTP server. Do NOT expose this to the public
+internet. Default: no monitoring server.
+
+=item B<mail_delivery_agent_bin> (string):
+
+Mail delivery agent (MDA, also known as LDA) to use. This should point
+to the binary to use to deliver email to local users. The content of the
+email will be passed via stdin. If it exits unsuccessfully, we assume
+the mail was not delivered. Default: F<maildrop>.
+
+=item B<mail_delivery_agent_args> (repeated string):
+
+Command line arguments for the mail delivery agent. One per argument.
+Some replacements will be done.
+
+On an email sent from marsnik@mars to venera@venus:
+
+    %from%        -> from address (marsnik@mars)
+    %from_user%   -> from user (marsnik)
+    %from_domain% -> from domain (mars)
+    %to%          -> to address (venera@venus)
+    %to_user%     -> to user (venera)
+    %to_domain%   -> to domain (venus)
+
+Default: C<"-f", "%from%", "-d", "%to_user%">  (adequate for procmail and
+maildrop).
+
+=item B<data_dir> (string):
+
+Directory where we store our persistent data. Default:
+F</var/lib/chasquid>.
+
+=item B<suffix_separators> (string):
+
+Suffix separator, to perform suffix removal of local users.  For
+example, if you set this to C<-+>, email to local user C<user-blah> and
+C<user+blah> will be delivered to C<user>.  Including C<+> is strongly
+encouraged, as it is assumed for email forwarding.  Default: C<+>.
+
+=item B<drop_characters> (string):
+
+Characters to drop from the user part on local emails.  For example, if
+you set this to C<._>, email to local user C<u.se_r> will be delivered to
+C<user>.  Default: C<.>.
+
+=item B<mail_log_path> (string):
+
+Path where to write the mail log to.  If C<< <syslog> >>, log using the
+syslog (at C<MAIL|INFO> priority).  Default: C<< <syslog> >>.
+
+=back
+
+=head1 SEE ALSO
+
+chasquid(1)
diff --git a/docs/man/generate.sh b/docs/man/generate.sh
new file mode 100755
index 0000000..f14ebf6
--- /dev/null
+++ b/docs/man/generate.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Convert pod files to manual pages, using pod2man.
+# 
+# Assumes files are named like:
+#   <name>.<section>.pod
+
+set -e
+
+for IN in *.pod; do
+	OUT=$( basename $IN .pod )
+	SECTION=${OUT##*.}
+	NAME=${OUT%.*}
+
+	podchecker $IN
+	pod2man --section=$SECTION --name=$NAME \
+		--release "" --center "" \
+		$IN $OUT
+done
diff --git a/docs/man/mda-lmtp.1 b/docs/man/mda-lmtp.1
new file mode 100644
index 0000000..3227da7
--- /dev/null
+++ b/docs/man/mda-lmtp.1
@@ -0,0 +1,186 @@
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "mda-lmtp 1"
+.TH mda-lmtp 1 "2018-04-02" "" ""
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+mda\-lmtp \- MDA that uses LMTP to do the mail delivery
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+mda-lmtp
+[\fB\-addr_network\fR \fInet\fR]
+\&\fB\-addr\fR \fIaddr\fR
+\&\fB\-d\fR \fIrecipient\fR
+\&\fB\-f\fR \fIfrom\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+mda-lmtp is a very basic \s-1MDA\s0 that uses \s-1LMTP\s0 to do the mail delivery.
+.PP
+It takes command line arguments similar to maildrop or procmail, reads an
+email via standard input, and sends it over the given \s-1LMTP\s0 server.  Supports
+connecting to \s-1LMTP\s0 servers over \s-1UNIX\s0 sockets and \s-1TCP.\s0
+.PP
+It can be used when your mail server does not support \s-1LMTP\s0 directly.
+.SH "EXAMPLE"
+.IX Header "EXAMPLE"
+\&\fBmda-lmtp\fR \fI\-\-addr=localhost:1234\fR \fI\-f juan@casa\fR \fI\-d jose\fR < email
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-addr\fR \fIaddress\fR" 8
+.IX Item "-addr address"
+\&\s-1LMTP\s0 server address to connect to.
+.IP "\fB\-addr_network\fR \fInetwork\fR" 8
+.IX Item "-addr_network network"
+Network of the \s-1LMTP\s0 address (e.g. \fIunix\fR or \fItcp\fR). If not present, it will
+be autodetected from the address itself.
+.IP "\fB\-d\fR \fIrecipient\fR" 8
+.IX Item "-d recipient"
+Recipient.
+.IP "\fB\-f\fR \fIfrom\fR" 8
+.IX Item "-f from"
+Whom the message is from.
+.SH "RETURN VALUES"
+.IX Header "RETURN VALUES"
+.IP "\fB0\fR" 8
+.IX Item "0"
+success
+.IP "\fB75\fR" 8
+.IX Item "75"
+temporary failure
+.IP "\fIother\fR" 8
+.IX Item "other"
+permanent failures (usually indicate misconfiguration)
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIchasquid\fR\|(1)
diff --git a/docs/man/mda-lmtp.1.pod b/docs/man/mda-lmtp.1.pod
new file mode 100644
index 0000000..308306d
--- /dev/null
+++ b/docs/man/mda-lmtp.1.pod
@@ -0,0 +1,73 @@
+
+=head1 NAME
+
+mda-lmtp - MDA that uses LMTP to do the mail delivery
+
+=head1 SYNOPSIS
+
+mda-lmtp
+[B<-addr_network> I<net>]
+B<-addr> I<addr>
+B<-d> I<recipient>
+B<-f> I<from>
+
+=head1 DESCRIPTION
+
+mda-lmtp is a very basic MDA that uses LMTP to do the mail delivery.
+
+It takes command line arguments similar to maildrop or procmail, reads an
+email via standard input, and sends it over the given LMTP server.  Supports
+connecting to LMTP servers over UNIX sockets and TCP.
+
+It can be used when your mail server does not support LMTP directly.
+
+=head1 EXAMPLE
+
+B<mda-lmtp> I<--addr=localhost:1234> I<-f juan@casa> I<-d jose> < email
+
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-addr> I<address>
+
+LMTP server address to connect to.
+
+=item B<-addr_network> I<network>
+
+Network of the LMTP address (e.g. I<unix> or I<tcp>). If not present, it will
+be autodetected from the address itself.
+
+=item B<-d> I<recipient>
+
+Recipient.
+
+=item B<-f> I<from>
+
+Whom the message is from.
+
+=back
+
+
+=head1 RETURN VALUES
+
+=over 8
+
+=item B<0>
+
+success
+
+=item B<75>
+
+temporary failure
+
+=item I<other>
+
+permanent failures (usually indicate misconfiguration)
+
+=back
+
+=head1 SEE ALSO
+
+chasquid(1)
diff --git a/docs/man/smtp-check.1 b/docs/man/smtp-check.1
new file mode 100644
index 0000000..a5e6cef
--- /dev/null
+++ b/docs/man/smtp-check.1
@@ -0,0 +1,156 @@
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "smtp-check 1"
+.TH smtp-check 1 "2018-04-03" "" ""
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+smtp\-check \- SMTP setup checker
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBsmtp-check\fR [\-port \fIport\fR] [\-skip_tls_check] \fIdomain\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+smtp-check is a command-line too for checking \s-1SMTP\s0 setups (\s-1DNS\s0 records, \s-1TLS\s0
+certificates, \s-1SPF,\s0 etc.).
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-port\fR \fIport\fR:" 8
+.IX Item "-port port:"
+Port to use for connecting to the \s-1MX\s0 servers.
+.IP "\fB\-skip_tls_check\fR:" 8
+.IX Item "-skip_tls_check:"
+Skip \s-1TLS\s0 check (useful if connections are blocked).
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIchasquid\fR\|(1)
diff --git a/docs/man/smtp-check.1.pod b/docs/man/smtp-check.1.pod
new file mode 100644
index 0000000..a35eaec
--- /dev/null
+++ b/docs/man/smtp-check.1.pod
@@ -0,0 +1,31 @@
+=head1 NAME
+
+smtp-check - SMTP setup checker
+
+=head1 SYNOPSIS
+
+B<smtp-check> [-port I<port>] [-skip_tls_check] I<domain>
+
+=head1 DESCRIPTION
+
+smtp-check is a command-line too for checking SMTP setups (DNS records, TLS
+certificates, SPF, etc.).
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-port> I<port>:
+
+Port to use for connecting to the MX servers.
+
+=item B<-skip_tls_check>:
+
+Skip TLS check (useful if connections are blocked).
+
+=back
+
+=head1 SEE ALSO
+
+chasquid(1)
+