From owner-freebsd-questions Wed Nov 6 18:10: 0 2002 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 C77E637B401 for ; Wed, 6 Nov 2002 18:09:57 -0800 (PST) Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C20543E6E for ; Wed, 6 Nov 2002 18:09:57 -0800 (PST) (envelope-from ataraxia@cox.net) Received: from cox.net ([68.98.181.29]) by lakemtao04.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20021107020955.FCMW1315.lakemtao04.cox.net@cox.net>; Wed, 6 Nov 2002 21:09:55 -0500 Message-ID: <3DC9CB73.5040502@cox.net> Date: Wed, 06 Nov 2002 21:09:55 -0500 From: Ray Kohler User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021102 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Giorgos Keramidas Cc: "Gary W. Swearingen" , freebsd-questions@FreeBSD.ORG Subject: Re: sendmail without (real) hostname? References: <3DC9A3B4.1030303@cox.net> <20021107012453.GA695@gray.sea.gr> In-Reply-To: <3DC9A3B4.1030303@cox.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Giorgos Keramidas wrote: > On 2002-11-06 17:11, "Gary W. Swearingen" wrote: > > >Ray Kohler writes: > > > >>Is there any way to get outgoing mail working on a system with a dynamic > >>IP and no DNS entries? Mail is sent as it is but of course no one will > >>relay it. > >> > >>All I really want is the ability to use send-pr so I can send patches > >>without having them mangled by line-wrapping. > > > >If I understand the question, change the default /etc/mail/freebsd.mc: > > > >< dnl define(`SMART_HOST', `your.isp.mail.server') > >--- > > > >>define(`SMART_HOST', `yourISPsMailHost.yourISP.net') > > > >And rebuild the two sendmail .cf files in that dir following the README > >and maybe the sendmail manpage. You'll probably have to use "sendmail" > >vars from /etc/default/rc.conf and (re)start some sendmail daemons. > >It's nasty and I didn't take notes. > > > >And I doubt if send-pr will work without your deciphering the script > >to see if it can be fooled with environmental vars or you could modify > >it. I've always just edited a copy of a template PR and then mailed it. > > > That's one solution. It still depends on having a working mail user > agent and mail transfer agent somewhere (not necessarily in the same > machine). It does have good things too though. One can edit the PR > template locally, and then transfer the edited report practically > anywhere and mail it using their mailer at work, at a friend's house, > or wherever. > > Another solution is to set things up so that Sendmail will masquerade > properly, and convert local addresses (including envelope sender > addresses) to "real" addresses. I customarily do this with the > genericstable and masquerade features. The following directives in my > freebsd.mc file work together to do this: > > FEATURE(`masquerade_envelope')dnl > FEATURE(`masquerade_entire_domain')dnl > MASQUERADE_DOMAIN(`sea.gr') > MASQUERADE_AS(`sea.gr')dnl > > FEATURE(`genericstable', `btree -o /etc/mail/genericstable')dnl > FEATURE(`generics_entire_domain')dnl > GENERICS_DOMAIN(`sea.gr')dnl > > The first four take care of masquerading all the email that comes from > hosts in the *.sea.gr domain to `sea.gr' and then the last three take > over, converting my local address using /etc/mail/genericstable.db > that is generated from /etc/mail/genericstable: > > % cat /etc/mail/genericstable > keramida@gray.sea.gr keramida@ceid.upatras.gr > > Then, I can use send-pr(1), mail(1) or whatever. It doesn't matter > that my sea.gr local domain doesn't exist, since I am using the proper > SMART_HOST for my ISP and the envelope address contains an address > that does exist: keramida@ceid.upatras.gr. This seems to have worked, so far as my testing can determine. I've been struggling with this problem off and on for years now, too. Sendmail is so enormously complicated that I never could get to the bottom of it. I once before thought I had gotten it to work but somehow all mail destined for this host was going to the host I masqueraded as. This got me in trouble when `periodic daily' ran that night and the output got sent to root@somebody_elses_box... - @ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message