'\" 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 8 "Aug 10, 2004" .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 .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. .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(8) 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 .LP The following options are supported: .TP \fB\fB-b\fR\fR System boot special case. Make sure localhost is accepting SMTP connections before initiating the SMTP session with server-host. This option is useful because it prevents race conditions between \fBsendmail\fR(8) accepting connections and \fIserver-host\fR attempting to deliver queued mail. This check is performed automatically if no \fIclient-hosts\fR are specified. .TP \fB\fB-v\fR\fR 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. .SH ENVIRONMENT VARIABLES .LP No environment variables are used. However, at service startup \fBsendmail\fR reads \fB/etc/default/sendmail\fR. In this file, if the variable \fBETRN_HOSTS\fR is set, the startup script parses this variable and invokes \fBetrn\fR appropriately. \fBETRN_HOSTS\fR should be of the form: .in +2 .nf "s1:c1.1,c1.2 s2:c2.1 s3:c3.1,c3.2,c3.3" .fi .in -2 .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: .in +2 .nf /usr/sbin/sendmail -qR \fIclient\fR .fi .in -2 .LP on the host \fIserver\fR. .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBetrn\fR .sp .LP Inserting the line: .in +2 .nf ETRN_HOSTS="s1.domain.com:clnt.domain.com s2.domain.com:clnt.domain.com" .fi .in -2 .LP in \fB/etc/default/sendmail\fR results in \fBsendmail\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. .LP The line: .in +2 .nf ETRN_HOSTS="server.domain.com:client1.domain.com,client2.domain.com" .fi .in -2 .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. .LP The line: .in +2 .nf ETRN_HOSTS="server1.domain.com server2.domain.com" .fi .in -2 .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(8) accepts email, with that host name as the argument. .SH FILES .TP \fB/etc/mail/sendmail.cf\fR default \fBsendmail\fR configuration file .TP \fB/etc/default/sendmail\fR Variables used by \fBsendmail\fR service. .SH SEE ALSO .LP \fBsendmail\fR(8) .LP RFC 1985 .SH NOTES .LP Not all SMTP servers support \fBETRN\fR.