From owner-freebsd-isp@FreeBSD.ORG Tue Jan 24 19:05:44 2006 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A912E16A41F for ; Tue, 24 Jan 2006 19:05:44 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from thorn.pobox.com (thorn.pobox.com [208.210.124.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3963143D4C for ; Tue, 24 Jan 2006 19:05:44 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from thorn (localhost [127.0.0.1]) by thorn.pobox.com (Postfix) with ESMTP id 3343CE3; Tue, 24 Jan 2006 14:06:05 -0500 (EST) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by thorn.sasl.smtp.pobox.com (Postfix) with ESMTP id D32876D76; Tue, 24 Jan 2006 14:06:03 -0500 (EST) Received: from lists by mappit.local.linnet.org with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1F1TU4-00092d-Du; Tue, 24 Jan 2006 19:05:40 +0000 Date: Tue, 24 Jan 2006 19:05:40 +0000 From: Brian Candler To: George Georgalis Message-ID: <20060124190540.GA34722@uk.tiscali.com> References: <768cbe130601221107t774b50dbp785640aef5473e33@mail.gmail.com> <20060124012941.GA6825@sta.duo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060124012941.GA6825@sta.duo> User-Agent: Mutt/1.4.2.1i Cc: freebsd-isp@freebsd.org Subject: Re: Sending mail to SMTP from command line X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2006 19:05:44 -0000 On Mon, Jan 23, 2006 at 08:29:41PM -0500, George Georgalis wrote: > On Sun, Jan 22, 2006 at 01:07:49PM -0600, Kenny @ Gmail wrote: > >Google is your friend. > >http://www.yuki-onna.co.uk/email/smtp.html > > I don't think that's what the OP had in mind... atthis moment I'm > typing with a broken terminal... at least I can use vim... > > problem is no /usr/lib/sendmail replacement that doesn't require a > daemon to watch the queue and connect to remote hosts. > > in this age of regulated sites that would be really handy too. eg > at a financial site, it would be really useful to not run a smtp > daemon (even only on 127.0.0.1) to avoid the audit; but still have > a sendmail replacement which forks and tries to deliver the mail > for seven days eg one process for each message, or something more > advanced, one process for a queue in a tempdir which disappears > when each message is delivered and the process ends. (my idea, > public domain) You can install a sendmail replacement which has no queue - it just opens a port 25 connection to a designated smarthost(s) and dumps the mail there. The process runs in the foreground and if it can't forward to the smarthost then it exits with a non-zero exit code. Examples of this are mail/ssmtp in ports, and exim in its "mua_wrapper" mode. http://www.exim.org/exim-html-4.60/doc/html/spec.html/ch47.html (Note that exim still does write the mail to its spool directory temporarily, and therefore needs to be run setuid or setgid to the spool owner, but it doesn't need root) Not all user programs properly handle the return code from a foreground sendmail process, however. If you actually want the mail to be stored in local queue with background retries if necessary, just run a regular MTA, but turn off its smtp daemon. In many cases, just change '-bd -q30m' to '-q30m' Regards, Brian.