SUBMIT(8) | Double Precision, Inc. | SUBMIT(8) |
NAME¶
submit - Submit a new message to the Courier mail server
SYNOPSIS¶
/usr/bin/submit [-expn=address] [-vrfy=address] [-vhost=address] [-bcc] [-delay=n] [-rfc3848=type] {module} {"type; hostid"}
DESCRIPTION¶
The submit program submits messages to the Courier mail server for processing. The submit program is not intended to be invoked by the end user. It is used by the Courier mail server input modules only. The submit program's global read and execute permissions are turned off, so that it can only be executed by a process that's a member of the courier group. submit is installed in the /usr/lib/courier/courier directory.
submit always takes two command line arguments after any options:
module
"type; hostid"
The submit program takes the following options:
-expn=address
-vrfy=address
-bcc
-delay=n
-rfc3848=text
-vhost=address
RESPONSES FROM SUBMIT¶
All replies from submit follow the format of SMTP responses, as defined in RFC822.
To summarize: the responses are one or more lines long. Every line in the response instead of the last one consists of a three-digit numerical code, a dash, then arbitrary text. The last line (or the only line of the response) starts with a three-digit numerical code, a single space, and arbitrary text. The first digit of the numerical code indicates whether the response indicates success, or failure. If the first digit is 5, the response indicates a permanent failure. If the first digit is 4, the response indicates a temporary failure (the message or the address should be resubmitted later). If the first digit is not 4 or 5, the response indicates success, or acceptance.
MESSAGE SUBMISSION¶
Unless either -expn or -vrfy option is specified, submit reads the message envelope and contents from standard input, as follows. All input and output to submit consists of newline-terminated (NOT carriage return/newline terminated) lines of text.
submit reads the first line of text, which specifies the envelope sender address. The line is formatted as follows:
address<tab>format<tab>envid
<tab> is the ASCII tab character. The address may be an empty string, optionally followed by tab, then "format", another tab, then "envid".
format is one or more chatacters that specify delivery status notification processing, and other message options. The 'F' character specifies that delivery status notifications should include the entire message, 'H' specifies just the headers of the message should be included. Absence of either 'F' or 'H' specifies no preference. "S{keyword}" specifies the optional SECURITY extension keyword for this message. The 'V' character in format sets the VERP extension flag for this message. The '8' character is a flag indicating that the message was received via SMTP with a SMTPUTF8 keyword, this prepends “UTF8” to the transmission type passed in via -rfc3848.
envid is the original message envelope ID, that will be shown on any delivery status notifications. NOTE: envid must be specified using xtext encoding (see the relevant RFCs).
After reading the first line of text, submit prints a response (see "RESPONSES FROM SUBMIT", above). If the response is a failure, submit terminates immediately. Otherwise, submit then reads one or more envelope recipients.
Each envelope recipient is read as a single non-empty line of text, formatted as follows:
address<tab>dsn<tab>oreceipient
address is a non-empty recipient E-mail address, optionally followed by the tab character, then zero or more characters specifying dsn, then a tab character, then the orecipient value.
dsn is zero or more of the following characters: S - send a delivery status notification upon a successful delivery to this address, F - send a DSN upon a failed delivery, D - send a DSN upon a mail delay, N - never send a DSN. oreceipient is the "Original Recipient", as specified in RFC1894, except that is not encoded using xtext encoding, but in unencoded UTF-8.
submit will print a response to each recipient (see "RESPONSES FROM SUBMIT", above). If at least one recipient address has been succesfully specified, a blank line is read to specify end of recipient list, which is followed by the entire message, headers and body.
A single blank line terminates the list of recipients. That is followed by the message itself, until end of file.
The blank line can be present before even a the first recipient is specified. If so, submit obtains the list of recipient from the message's headers.
submit reads the message headers and body until end-of-file. Then, submit prints a response (see above), indicating whether or not the message was accepted for delivery, and terminates.
ADDRESS REWRITING¶
Each recipient address (whether specified explicitly, or obtained from the message headers), will be rewritten according to the rewriting rules specified by the input module. Each address in the headers of the message will also be rewritten.
After rewriting each recipient address, submit will search the aliases.dat file for this address, to see if it represents a locally defined alias. Submit searches /usr/lib/courier/courier/modules/module/aliases.dat and /etc/courier/aliases.dat (actual locations may be changed by the system administrator). If the address is found, the recipient address will be replaced by the addresses defined in the aliases.dat file.
ENVIRONMENT VARIABLES¶
submit also reads the following environment variables to further specify how the message is to be processed:
BLOCK
DSNENVID
DSNNOTIFY
DSNRET
NOADDDATE
NOADDMSGID
NOADDRREWRITE
MIME
SEE ALSO¶
courierpop3d(8)[1], couriertcpd(8)[2], authlib(7)[3].
AUTHOR¶
Sam Varshavchik
NOTES¶
- 2.
- couriertcpd(8)
- 3.
- authlib(7)
10/28/2020 | Courier Mail Server |