From owner-freebsd-questions@FreeBSD.ORG Wed Dec 12 21:08:20 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D187016A41A for ; Wed, 12 Dec 2007 21:08:20 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by mx1.freebsd.org (Postfix) with ESMTP id 9079813C465 for ; Wed, 12 Dec 2007 21:08:19 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so1036292pyb.3 for ; Wed, 12 Dec 2007 13:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=jB05p4uWe6YxDuOCawSLwbhWYuvFFFhkLaoG7Xj7R08=; b=YITOAGw4nc0wQbwAYO0Gx+qKLTgoqTlfbx8XXBwu60dA2hRveWgCWrOyZqDglLgVG59tVHPH8PwEuQdKRmWAuIESvLKe7anBQi1TsYCK6n8Nnr8U6unV1UTJ3yfoBeUCgC7DKM9m6ic095yzpoEaXVNtPMVEE7l52ltaov9K/lQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=MJtZbLBTRBeZY2dlHI+iCTlAjTIX/dy3mGTnGuyoA/SeN3GRtyGYJyDFYKd2C826yWqVUKchrxku2PROEOE0Xg+qsK/qWGwQ3bEzKzB2+E4e5zMG9p3bG+xlWlk5RXc3Ev0Xsd8BDhxuGnmnss/vdwEeAtKexzfok0Z3Xi5rllI= Received: by 10.65.205.16 with SMTP id h16mr2499028qbq.31.1197493693874; Wed, 12 Dec 2007 13:08:13 -0800 (PST) Received: from ?192.168.2.2? ( [67.85.89.184]) by mx.google.com with ESMTPS id e16sm2927495qbe.2007.12.12.13.08.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Dec 2007 13:08:12 -0800 (PST) Message-ID: <47604DBB.9040305@gmail.com> Date: Wed, 12 Dec 2007 16:08:11 -0500 From: "Aryeh M. Friedman" User-Agent: Thunderbird 2.0.0.9 (X11/20071209) MIME-Version: 1.0 To: Giorgos Keramidas References: <24B63B5B-74E3-4F5C-B0C4-D44EBF797966@mac.com> <475D5670.1030207@gmail.com> <20071210214254.GA8185@kobe.laptop> <475DB713.4060504@gmail.com> <20071211162638.GA16776@kobe.laptop> <475ED0A2.7030205@gmail.com> <20071211181032.GA1712@kobe.laptop> <475ED62E.1040904@gmail.com> <20071211184046.GA8175@kobe.laptop> <475EDCAE.90907@gmail.com> <20071211205125.GA1455@kobe.laptop> In-Reply-To: <20071211205125.GA1455@kobe.laptop> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: smart_host on sendmail min config 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, 12 Dec 2007 21:08:20 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Giorgos Keramidas wrote: > On 2007-12-11 13:53, "Aryeh M. Friedman" > wrote: >> Giorgos Keramidas wrote: >>> You still haven't shown us: >>> >>> * How your local rc system starts Sendmail >> Until I can get it right from the command line I am not going to >> include it in my /etc/rc thus currently there is none >> >>> * The active Sendmail processes you have now >> Except for the one I start (with the below command line) before >> sending there is none running. > > Then you need to replicate what `/etc/rc.d/sendmail' does. You > have the code to that script, you also have `/etc/defaults/rc.conf' > as a guide of the defaults supported by FreeBSD. Happy hacking :) > > I'm not interested in rewriting `/etc/rc.d/sendmail' from scratch, > so other than a few pointers like the following, I'm out of the > thread: > >> here is the complete transcript of my last attempt to actually >> send something: [...] > >> monster-freebsd# sendmail -bd -q1m > > Here you started a sendmail process which listens for connections > to *all* interfaces. That's probably ok if you plan to accept > incoming SMTP connections on _any_ interface, i.e. because you are > running a Sendmail server accessible from outside. > > On my laptop this would be replaced by: > > /usr/sbin/sendmail -L smtpd -bd -q30m \ > -ODaemonPortOptions=Addr=localhost > > Note the use of the -O flag to make sure Sendmail is only listening > on the localhost:25 port for mail submission requests. > > Then you have to start a *second* Sendmail instance, to flush the > local `clientmqueue' and forward the messages you see as `Deferred' > when you run the `mailq -Ac' command: > >> monster-freebsd# mailq -Ac /var/spool/clientmqueue (8 requests) - >> -----Q-ID----- --Size-- -----Q-Time----- - >> ------------Sender/Recipient----------- lBAEQDUM077228 9 >> Mon Dec 10 09:26 aryeh (Deferred: Connection refused by >> [127.0.0.1]) aryeh@gmail.com > > Now you have to run a second Sendmail instance, i.e. with: > > /usr/sbin/sendmail -L mailq -Ac -q10m > > NOTE: The `smtpd' and `mailq' arguments to the -L options are not > the standard names FreeBSD assigns to these processes. They are > just the ones I use on my laptop. > > Since you are using a custom, local sendmail startup script, that's > about the best I can write to get you kickstarted. For more help > with the way Sendmail operates, you can always refer to the > ``Sendmail(TM) Installation and Operation Guide''. A copy of the > guide is conveniently installed by the FreeBSD installation process > at: > > /usr/share/doc/smm/08.sendmailop/* > > Good luck with the startup scripts. I don't really understand why > you insist on rewriting something which works(TM), is featureful > and easy to extend, like the rc.d scripts, but that's besides the > point :-) > > - Giorgos > > > > Above still does nothing: monster-freebsd# /usr/sbin/sendmail -L smtpd -bd -q30m - -ODaemonPortOptions=Addr=localhost -ODaemonPortOptions=Addr=localhost monster-freebsd# /usr/sbin/sendmail -L mailq -Ac -q10m monster-freebsd# mailq -v WARNING: local host name (monster-freebsd) is not qualified; see cf/README: WHO AM I? /var/spool/mqueue (2 requests) - -----Q-ID----- --Size-- -Priority- ---Q-Time--- - --------Sender/Recipient-------- lBCKovjf051782 10 30377 Dec 12 15:50 (Deferred: 421 Connection not accepted at this time) (Deferred: 421 Connection not accepted at this time) lBCKovjh051782 9 30380 Dec 12 15:50 (Deferred: 421 Connection not accepted at this time) (Deferred: 421 Connection not accepted at this time) Total requests: 2 monster-freebsd# tail -f /var/log/maillog Dec 9 09:15:38 newsyslog[587]: logfile first created Dec 9 09:15:38 sm-mta[720]: starting daemon (8.14.2): SMTP+queueing@00:30:00 Dec 9 09:15:38 sm-msp-queue[724]: starting daemon (8.14.2): queueing@00:30:00 Dec 9 12:22:28 sm-mta[729]: starting daemon (8.14.2): SMTP+queueing@00:30:00 Dec 9 12:22:28 sm-msp-queue[733]: starting daemon (8.14.2): queueing@00:30:00 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHYE27zIOMjAek4JIRAvzyAKCkTFuxsbH37S+JZCeG0dSwTFO98ACfWjcd VVP9Rwa6pJ1oA6rLpBfUIdU= =uFO1 -----END PGP SIGNATURE-----