Date: Tue, 24 Jan 2006 19:05:40 +0000 From: Brian Candler <B.Candler@pobox.com> To: George Georgalis <george@galis.org> Cc: freebsd-isp@freebsd.org Subject: Re: Sending mail to SMTP from command line Message-ID: <20060124190540.GA34722@uk.tiscali.com> In-Reply-To: <20060124012941.GA6825@sta.duo> References: <dr0dt1$sg0$1@sea.gmane.org> <768cbe130601221107t774b50dbp785640aef5473e33@mail.gmail.com> <20060124012941.GA6825@sta.duo>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060124190540.GA34722>