'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH etrn 1M "10 Aug 2004" "SunOS 5.11" "System Administration Commands" .SH NAME etrn \- start mail queue run .SH SYNOPSIS .LP .nf \fBetrn\fR [\fB-b\fR] [\fB-v\fR] \fIserver-host\fR [\fIclient-hosts\fR] .fi .SH DESCRIPTION .sp .LP SMTP's \fBETRN\fR command allows an SMTP client and server to interact, giving the server an opportunity to start the processing of its queues for messages to go to a given host. This is meant to be used in start-up conditions, as well as for mail nodes that have transient connections to their service providers. .sp .LP The \fBetrn\fR utility initiates an SMTP session with the host \fIserver-host\fR and sends one or more \fBETRN\fR commands as follows: If no \fIclient-hosts\fR are specified, \fBetrn\fR looks up every host name for which \fBsendmail\fR(1M) accepts email and, for each name, sends an \fBETRN\fR command with that name as the argument. If any \fIclient-hosts\fR are specified, \fBetrn\fR uses each of these as arguments for successive \fBETRN\fR commands. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-b\fR\fR .ad .RS 6n .rt System boot special case. Make sure localhost is accepting SMTP connections before initiating the SMTP session with server-host. .sp This option is useful because it prevents race conditions between \fBsendmail\fR(1M) accepting connections and \fIserver-host\fR attempting to deliver queued mail. This check is performed automatically if no \fIclient-hosts\fR are specified. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .RS 6n .rt The normal mode of operation for \fBetrn\fR is to do all of its work silently. The \fB-v\fR option makes it verbose, which causes \fBetrn\fR to display its conversations with the remote SMTP server. .RE .SH ENVIRONMENT VARIABLES .sp .LP No environment variables are used. However, at system start-up, \fBsvc:/network/smtp:sendmail\fR reads \fB/etc/default/sendmail\fR. In this file, if the variable \fBETRN_HOSTS\fR is set, \fBsvc:/network/smtp:sendmail\fR parses this variable and invokes \fBetrn\fR appropriately. \fBETRN_HOSTS\fR should be of the form: .sp .in +2 .nf "s1:c1.1,c1.2 s2:c2.1 s3:c3.1,c3.2,c3.3" .fi .in -2 .sp .sp .LP That is, white-space separated groups of \fIserver:client\fR where \fIclient\fR can be one or more comma-separated names. The \fI:client\fR part is optional. \fIserver\fR is the name of the server to prod; a mail queue run is requested for each \fIclient\fR name. This is comparable to running: .sp .in +2 .nf /usr/lib/sendmail -qR \fIclient\fR .fi .in -2 .sp .sp .LP on the host \fIserver\fR. .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBetrn\fR .sp .LP Inserting the line: .sp .in +2 .nf ETRN_HOSTS="s1.domain.com:clnt.domain.com s2.domain.com:clnt.domain.com" .fi .in -2 .sp .sp .LP in \fB/etc/default/sendmail\fR results in \fBsvc:/network/smtp:sendmail\fR invoking \fBetrn\fR such that \fBETRN\fR commands are sent to both \fBs1.domain.com\fR and \fBs2.domain.com\fR, with both having \fBclnt.domain.com\fR as the \fBETRN\fR argument. .sp .LP The line: .sp .in +2 .nf ETRN_HOSTS="server.domain.com:client1.domain.com,client2.domain.com" .fi .in -2 .sp .sp .LP results in two \fBETRN\fR commands being sent to \fBserver.domain.com\fR, one with the argument \fBclient1.domain.com\fR, the other with the argument \fBclient2.domain.com\fR. .sp .LP The line: .sp .in +2 .nf ETRN_HOSTS="server1.domain.com server2.domain.com" .fi .in -2 .sp .sp .LP results in set of a \fBETRN\fR commands being sent to both \fBserver1.domain.com\fR and \fBserver2.domain.com\fR; each set contains one \fBETRN\fR command for each host name for which \fBsendmail\fR(1M) accepts email, with that host name as the argument. .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/mail/sendmail.cf\fR\fR .ad .RS 25n .rt \fBsendmail\fR configuration file .RE .sp .ne 2 .mk .na \fB\fB/etc/default/sendmail\fR\fR .ad .RS 25n .rt Variables used by \fBsvc:/network/smtp:sendmail\fR .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityStable .TE .SH SEE ALSO .sp .LP \fBsendmail\fR(1M), \fBattributes\fR(5) .sp .LP RFC 1985 .SH NOTES .sp .LP Not all SMTP servers support \fBETRN\fR.