diff options
Diffstat (limited to 'mockmta.1')
-rw-r--r-- | mockmta.1 | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/mockmta.1 b/mockmta.1 new file mode 100644 index 0000000..66de1c0 --- /dev/null +++ b/mockmta.1 @@ -0,0 +1,122 @@ +.TH MOCKMTA 1 "June 16, 2021" "MOCKMTA" "General Commands Manual" +.SH NAME +mockmta \- mock MTA server for experimental purposes +.SH SYNOPSIS +\fBmockmta\fR\ + [\fB\-dv?\fR]\ + [\fB\-c \fICERT\fR]\ + [\fB\-a \fICA\fR]\ + [\fB\-k \fIKEY\fR]\ + [\fB\-l \fILEVEL\fR]\ + [\fB\-P \fIFILE\fR]\ + [\fB\-p \fIPORT\fR]\ + [\fB\-t \fISEC\fR]\ + \fIMAILBOX\fR +.SH DESCRIPTION +Starts a mock MTA, which behaves almost identically to the real one, +except that it listens on localhost only and delivers all messages, no +matter their actual recipients, to the given MAILBOX file. +.PP +No attempts are made to interpret the data supplied during the STMP +transaction, such as domain names, email addresses, etc, neither is +the material supplied in the \fBDATA\fR command verified to be a valid +email message. Except as being written to \fIMAILBOX\fR, these data are +ignored. +.PP +\fBMockmta\fR can work both as an inetd-style process and as a standalone +daemon. The inetd mode can be used with \fBGNU pies\fR as follows: +.PP +.EX + component sm { + mode inetd; + socket inet://0.0.0.0:25; + command "/usr/bin/mockmta /var/spool/mail/dropmail"; + } +.EE +.PP +When run as a daemon, \fBmockmta\fR starts listening on localhost port +\fIPORT\fR (default 25). +.PP +To support TLS, the program must be compiled with the \fBGnuTLS\fR library. +.PP +To enable the \fBSTARTTLS\fR ESMTP command, supply the names of the certificate +(\fB\-c \fICERT\fR) and certificate key (\fB\-k \fIKEY\fR) files. +.SH OPTIONS +.TP +\fB\-a \fICA\fR +Name of certificate authority file. +.TP +\fB\-c \fICERT\fR +Name of the certificate file. +.TP +.B \-d +Daemon mode. +.TP +.B \-f +Remain in foreground (implies \fB\-d\fR). +.TP +\fB\-k \fIKEY\fR +Name of the certificate key file. +.TP +\fB\-l \fIPRIO\fR +Log messages of priority \fIPRIO\fR and lower. Valid priorities +(ordered by their numeric value) are: +.BR emerg , +.BR alert , +.BR crit , +.BR err , +.BR warning , +.BR notice , +.BR info , +.BR debug . +.sp +Default is \fBinfo\fR. +.TP +\fB\-P \fIFILE\fR +Write PID of the daemon process to \fIFILE\fR (with \fB\-d\fR or \fB\-f\fR). +.TP +\fB\-p \fIPORT\fR +Listen on this port. +.TP +\fB\-t \fISEC\fR +Set SMTP timeout. +.TP +.B \-v +Print program version and exit. +.TP +.B \-? +Print short usage summary and exit. +.SH EXIT CODES +.TP +.B 0 +Success. +.TP +.B 1 +Failure (see stderr for details). +.TP +.B 2 +Timed out waiting for I/O. +.TP +.B 3 +Command line usage error. +.SH BUGS +At most 32 \fBRCPT\fR commands are allowed. +.SH AUTHOR +Sergey Poznyakoff <gray@gnu.org> +.SH LICENSE +Copyright (C) 2020-2021 Sergey Poznyakoff, Inc. +.br +.na +License GPLv3+: GNU GPL version 3 or later +<http://gnu.org/licenses/gpl.html> +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.-]* [0-9] \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: |