From owner-freebsd-questions@FreeBSD.ORG Thu Oct 26 14:01:24 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 19DC916A407 for ; Thu, 26 Oct 2006 14:01:24 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (unsane.co.uk [62.140.220.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE16043D49 for ; Thu, 26 Oct 2006 14:01:22 +0000 (GMT) (envelope-from jhary@unsane.co.uk) Received: from [192.168.10.217] (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.13.7/8.13.3) with ESMTP id k9QE0tmf090202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 26 Oct 2006 15:01:01 +0100 (BST) (envelope-from jhary@unsane.co.uk) Message-ID: <4540BF8C.8000000@unsane.co.uk> Date: Thu, 26 Oct 2006 15:00:44 +0100 From: Vince User-Agent: Thunderbird 1.5.0.7 (X11/20061017) MIME-Version: 1.0 To: ke han References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions Questions list Subject: Re: local smtp agent 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: Thu, 26 Oct 2006 14:01:24 -0000 ke han wrote: > I have an application on my FreeBSD 6.1 server which needs to send out > e-mail. I have access to a a well managed SMTP server on another > server. I would like to send e-mail from my app to a local SMTP agent > which then handles sending to the "real" SMTP server in a more > fault-tolerant manner than I can easily achieve with my app code. Very sensible, I've seen a lot of problems from developers trying to reinvent the wheel/smtp daemon ;) > I believe this to be a typical scenario. What is the recommended > approach? Use the default sendmail?or use procmail? Is there a howto > someone can point me to? Does the recommendation change if the local > SMTP agent needs to connect to the "real" SMTP server using TLS with id > and password? ssmtp is a good if basic approach. (/usr/ports/mail/ssmtp) I believe it supports TLS and auth although its been a while since i looked. (actually found a howto here http://www.qnd-guides.org/qnd-ssmtp.html which says it does) I'm just not sure about error handling (says it doesnt do queue's so if your "real" server is un-contactable i'm not sure how it handles that.) If this is an issue you might want a "real" MTA that will queue it and retry with your SMTP server set as a smarthost. You can use the base sendmail (just need a define(`SMART_HOST', `your.mail.server') in the .mc file and i think the default for sendmail in FreeBSD is to just work for outgoing, however getting TLS and auth involved makes it a lot more complex. I wouldnt really recommend it unless you fancy getting stuck into some semi complex sendmail config but if your interested See http://www.sendmail.org/m4/smtp_auth.html the section about sendmail acting as a client and http://www.sendmail.org/m4/starttls.html for the TLS side. and look in /etc/mail/ (freebsd.mc is a good starting .mc file but will need tweaking) Pretty much any of the MTAs in /usr/ports/mail can do what you want though, my favorites being postfix and exim. Hope this helps, Vince > thanks, ke han > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"