From owner-freebsd-questions@FreeBSD.ORG Wed Jun 25 21:25:28 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA1CA37B401 for ; Wed, 25 Jun 2003 21:25:28 -0700 (PDT) Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 637904400E for ; Wed, 25 Jun 2003 21:25:27 -0700 (PDT) (envelope-from matt@gsicomp.on.ca) Received: from gabby.gsicomp.on.ca ([65.95.177.176]) by tomts14-srv.bellnexxia.netESMTP <20030626042525.NEHE23441.tomts14-srv.bellnexxia.net@gabby.gsicomp.on.ca>; Thu, 26 Jun 2003 00:25:25 -0400 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (8.12.6/8.12.6) with SMTP id h5Q4KWmK049424; Thu, 26 Jun 2003 00:20:32 -0400 (EDT) (envelope-from matt@gsicomp.on.ca) Message-ID: <00ae01c33b9a$d97b6190$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Supote Leelasupphakorn" , References: <20030626040316.24118.qmail@web40613.mail.yahoo.com> Date: Thu, 26 Jun 2003 00:24:35 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: can't send email from my box. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 04:25:28 -0000 > Hi, all > > I have tried below > > echo "this is my testing email" | mail -s "1st mail" me@mydomain.com > > but no luck. /var/log/maillog show me that > > to=me@mydomain.com, ctladdr=pjn (1001/1001), delay=00:00:00, xdelay=00:00:00, > mailer=relay, pri=30040, relay=localhost.mytestdomain.com [127.0.0.1], > dsn=4.0.0, stat=Deferred: Connection refused by localhost.mytestdomain.com > > My question are > 1. Is it possible for sending emails from the host that hasn't run "sendmail" > on it. > 2. It seem "mail" try to connect SMTP on localhost.mytestdomain.com. If I want > "mail" connect to SMTP on the remote host (@mydomain.com's mail server), or > say I want to change my "outgoing mail host". How can I do this ? > > Thanks in advance, 1) You will need to set up sendmail as "submit-only" on your box. Look at /etc/mail/freebsd.submit.mc and "man rc.sendmail" 2) You need to set up sendmail to use another mail server instead of localhost. This is set using the "SMART_HOST" option in freebsd.submit.mc; check http://www.sendmail.org for documentation on how to set this. -- Matt Emmerton Take a look at "SMART_HOST" in /etc/mail/freebsd.mc