.TH MOCKMTA 1 "June 17, 2021" "MOCKMTA" "General Commands Manual" .SH NAME mockmta \- mock MTA server for experimental purposes .SH SYNOPSIS \fBmockmta\fR\ [\fB\-dsv?\fR]\ [\fB\-c \fICERT\fR]\ [\fB\-a \fICA\fR]\ [\fB\-k \fIKEY\fR]\ [\fB\-l \fILEVEL\fR]\ [\fB\-P \fIFILE\fR]\ [\fB\-p [\fIIP\fB:\fR]\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 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 25 by default. Alternative port and/or IP address can be requested using the \fB\-p\fR option. .PP Each incoming connection is verified using .B /etc/hosts.allow and .B /etc/hosts.deny files (daemon name \fBmockmta\fR). See .BR hosts_access (5), for a detailed description of these. .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 [\fIIP\fB:\fR]\fIPORT\fR Listen on this IP address and port. If \fIIP\fR is not given, listen on localhost. To listen on all available interfaces, use \fB\-p :\fIPORT\fR. .TP .B \-s Use syslog (facility \fBmail\fR) for logging. This is the default if \fB\-d\fR or \fB\-f\fR option is given. .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 SEE ALSO .BR hosts_access (5). .SH AUTHOR Sergey Poznyakoff .SH LICENSE Copyright (C) 2020-2021 Sergey Poznyakoff, Inc. .br .na License GPLv3+: GNU GPL version 3 or later .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: