From owner-freebsd-questions@FreeBSD.ORG Wed Mar 29 16:32:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 2C82916A423 for ; Wed, 29 Mar 2006 16:32:58 +0000 (UTC) (envelope-from greenwood.andy@gmail.com) Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id B98F343D5E for ; Wed, 29 Mar 2006 16:32:47 +0000 (GMT) (envelope-from greenwood.andy@gmail.com) Received: by pproxy.gmail.com with SMTP id i49so14623pye for ; Wed, 29 Mar 2006 08:32:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=QOlP+EnE/3QW8WlPBuAN7/20dDJdaPcRMdPe2zk4M2PoKOwlr4J+0bigPBJ81h3gz6LRmJBb8YS8vJTq1juk7Y+cY6sJoUNlukKmgLBLyWRl6FC3yDWRUf1heN4UXusfbdLZUqIL26K5gSZBLF2ylu5sPCco3KeBR+VnN6OpCrA= Received: by 10.35.81.10 with SMTP id i10mr1285446pyl; Wed, 29 Mar 2006 08:08:08 -0800 (PST) Received: by 10.35.52.10 with HTTP; Wed, 29 Mar 2006 08:08:08 -0800 (PST) Message-ID: <3ee9ca710603290808t641bd090y550bb54216a55cb0@mail.gmail.com> Date: Wed, 29 Mar 2006 11:08:08 -0500 From: "Andy Greenwood" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ssmtp X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2006 16:32:58 -0000 I'm having some trouble setting up ssmtp. I want to use logrotate to compress and email my server's logs to my gmail account. I can echo text directly to ssmtp and have it send the message ok, but when I try to use /usr/bin/mail, I get logs in my maillog trying to use sendmail, which is se= t to none in rc.conf. How do I set this up so that all mail sends out through ssmtp? /usr/local/etc/ssmtp/ssmtp.conf # # /etc/ssmtp.conf -- a config file for sSMTP sendmail. # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=3Dmyaddress@myisp.net # The place where the mail goes. The actual machine name is required # no MX records are consulted. Commonly mailhosts are named mail.domain.com # The example will fit if you are in domain.com and your mailhub is so named. mailhub=3Dmail.myisp.net # Example for SMTP port number 2525 # mailhub=3Dmail.your.domain:2525 # Example for SMTP port number 25 (Standard/RFC) # mailhub=3Dmail.your.domain # Example for SSL encrypted connection # mailhub=3Dmail.your.domain:465 # Where will the mail seem to come from? rewriteDomain=3Dmyisp.net # The full hostname hostname=3Dbehemoth.mydomain.com # Set this to never rewrite the "From:" line (unless not given) and to # use that address in the "from line" of the envelope. #FromLineOverride=3DYES # Use SSL/TLS to send secure messages to server. #UseTLS=3DYES # Use SSL/TLS certificate to authenticate against smtp host. #UseTLSCert=3DYES # Use this RSA certificate. #TLSCert=3D/usr/local/etc/ssmtp/ssmtp.pem Here's an example: #mail -s test message address@domain.com < Some_File #tail /var/log/maillog Mar 29 10:58:47 behemoth sendmail[41971]: k2TFwkuV041971: from=3Droot, size=3D3948, class=3D0, nrcpts=3D2, msgid=3D< 200603291558.k2TFwkuV041971@mydomain.com>, relay=3Droot@localhost Mar 29 10:58:47 behemoth sendmail[41971]: k2TFwkuV041971: to=3Dmessage, address@domain.com, ctladdr=3Droot (0/0), delay=3D00:00:01, xdelay=3D00:00:= 00, mailer=3Drelay, pri=3D63948, relay=3D[127.0.0.1] [127.0.0.1], dsn=3D4.0.0, stat=3DDeferred: Connection refused by [127.0.0.1] Obviously I don't get anything coming through with this example but #echo test | ssmtp address@domain.com #tail /var/log/maillog Mar 29 11:03:24 behemoth sSMTP[42000]: Sent mail for myaddress@myisp.net(22= 1 ibm58aec.myisp.net ESMTP server closing connection) I do recieve this message I'd be happy to provide any other information to anyone who can help me set this up.