Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

expn(1) [centos man page]

EXPN(1)                                                       General Commands Manual                                                      EXPN(1)

expn - recursively expand mail aliases SYNOPSIS
expn [-a] [-v] [-w] [-d] [-1] user[@hostname] [user[@hostname]]... DESCRIPTION
expn will use the SMTP expn and vrfy commands to expand mail aliases. It will first look up the addresses you provide on the command line. If those expand into addresses on other systems, it will connect to the other systems and expand again. It will keep doing this until no further expansion is possible. OPTIONS
The default output of expn can contain many lines which are not valid email addresses. With the -aa flag, only expansions that result in legal addresses are used. Since many mailing lists have an illegal address or two, the single -a, address, flag specifies that a few ille- gal addresses can be mixed into the results. More -a flags vary the ratio. Read the source to track down the formula. With the -a option, you should be able to construct a new mailing list out of an existing one. If you wish to limit the number of levels deep that expn will recurse as it traces addresses, use the -1 option. For each -1 another level will be traversed. So, -111 will traverse no more than three levels deep. The normal mode of operation for expn is to do all of its work silently. The following options make it more verbose. It is not necessary to make it verbose to see what it is doing because as it works, it changes its argv[0] variable to reflect its current activity. To see how it is expanding things, the -v, verbose, flag will cause expn to show each address before and after translation as it works. The -w, watch, flag will cause expn to show you its conversations with the mail daemons. Finally, the -d, debug, flag will expose many of the inner workings so that it is possible to eliminate bugs. ENVIRONMENT
No environment variables are used. FILES
/tmp/expn$$ temporary file used as input to nslookup. SEE ALSO
aliases(5), sendmail(8), nslookup(8), RFC 823, and RFC 1123. BUGS
Not all mail daemons will implement expn or vrfy. It is not possible to verify addresses that are served by such daemons. When attempting to connect to a system to verify an address, expn only tries one IP address. Most mail daemons will try harder. It is assumed that you are running domain names and that the nslookup(8) program is available. If not, expn will not be able to verify many addresses. It will also pause for a long time unless you change the code where it says $have_nslookup = 1 to read $have_nslookup = 0. Lastly, expn does not handle every valid address. If you have an example, please submit a bug report. CREDITS
In 1986 or so, Jon Broome wrote a program of the same name that did about the same thing. It has since suffered bit rot and Jon Broome has dropped off the face of the earth! (Jon, if you are out there, drop me a line) AVAILABILITY
The latest version of expn is available through anonymous ftp at AUTHOR
David Muir Sharnoff <> 7th Edition March 11, 1993 EXPN(1)

Check Out this Related Man Page

SUBMIT(8)                                                     Double Precision, Inc.                                                     SUBMIT(8)

submit - Submit a new message to the Courier mail server SYNOPSIS
/usr/bin/submit [-expn=address] [-vrfy=address] [-vhost=address] [-bcc] [-delay=n] {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 daemon group. submit is installed in the /usr/lib/courier/courier directory. submit always takes two command line arguments after any options: module This argument identifies the module that's running the submit command. It must be one of the module names that the Courier mail server knows about, such as local, or esmtp. This argument determines address rewriting rules. "type; hostid" This single argument identifies the source of the message, and must be suitable for the Remote-MTA: header in delivery status notifications, as specified by RFC 1894. For messages that are received via ESMTP, this argument is typically "dns; helohost (hostname [ip.address])". The submit program takes the following options: -expn=address Do not accept a message, instead "expand" the given address. If the specified address matches a locally-defined alias, submit prints the addresses this address expands to. If the specified address does not match a locally-defined alias, the address is displayed by itself. -vrfy=address Do not accept a message, instead verify the given address. submit prints a suitable message and sets the exit code to indicate whether the specified address is valid, or not. If the address matches a local alias, submit will indicate a valid address, and exit. If the address does not match a local alias, submit checks if this address is deliverable by any output protocol module. If so, submit will indicate a valid address, and exit. Otherwise, submit prints a "User unknown" error message, and exits. -bcc If no recipients are given, obtain the list of recipients from Bcc: headers only. Normally, if no recipients are specified, submit reads the list of recipients from the To:, Cc: and Bcc: headers (Bcc: headers are always removed). The -bcc option ignores To: and Cc: headers for this purpose. This option is ignored if an explicit recipient list is specified (see below). -delay=n Wait n seconds before delivering the message. If not specified, delivery begins after waiting the amount of time specified by the /etc/courier/submitdelay configuration time (default: 0 seconds -- immediate delivery). -vhost=address Append ".address" to names of all configuration files Courier reads while processing this message. 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. 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>orecipient 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. orecipient is the "Original Recipient", as specified in RFC1894, using xtext encoding. 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 If this variable is set to a non-empty value, submit will reject every recipient (in effect, rejecting the message). The contents of the environment variable will be used as the error message. DSNENVID If envid is not specified, or is blank, and this environment variable is defined, the contents of this variable is used as the original envelope id field for DSNs. Note that DSNENVID is copied verbatim into the Original-Envelope-Id field (if the message is relayed to another MTA, the Courier mail server automatically xtext-encodes it). DSNNOTIFY If the dsn field for a recipient is empty, the contents of this environment variable is used in its place. Also, if the recipient list is read from the headers, the contents of this environment variable are used to set the dsn setting. DSNRET If the format field for this message is empty, the contents of this environment variable is used in its place. NOADDDATE Normally the Courier mail server adds a Date: header to the message, if it does not have one. If this environment variable is set, the Courier mail server will not add a Date: header. NOADDMSGID Normally the Courier mail server adds a Message-Id: header to the message, if it does not have it. If this environment variable is set, the Courier mail server will not add a Message-Id: header. MIME Normally the Courier mail server adds any missing RFC2045 headers to the message. The MIME environment variable can be set to the following values: none - do not do any RFC2045 processing whatsoever; 7bit - if the message contains any 8-bit text, convert it to quoted-printable encoding; 8bit -if the message contains any quoted-printable encoded text that can be representing as 8bit-encoded text, then convert it to 8bit encoding. SEE ALSO
courierpop3d(8)[1], couriertcpd(8)[2], authlib(7)[3]. AUTHOR
Sam Varshavchik Author NOTES
1. courierpop3d(8) [set $man.base.url.for.relative.links]/courierpop3d.html 2. couriertcpd(8) [set $man.base.url.for.relative.links]/couriertcpd.html 3. authlib(7) [set $man.base.url.for.relative.links]/authlib.html Courier Mail Server 04/20/2012 SUBMIT(8)
Man Page

Featured Tech Videos