From owner-freebsd-questions@FreeBSD.ORG Wed Jul 6 01:56:07 2005 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 CB58F16A420 for ; Wed, 6 Jul 2005 01:56:06 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8F8343D53 for ; Wed, 6 Jul 2005 01:56:04 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 4617 invoked by uid 207); 6 Jul 2005 01:56:02 -0000 Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.186):. Processed in 1.332457 secs); 06 Jul 2005 01:56:02 -0000 Received: from dialup186.ach.sch.gr (HELO gothmog.gr) ([81.186.70.186]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 6 Jul 2005 01:56:00 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j661tviT003607; Wed, 6 Jul 2005 04:55:57 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j661tu3L003606; Wed, 6 Jul 2005 04:55:56 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 6 Jul 2005 04:55:56 +0300 From: Giorgos Keramidas To: Julian Elischer Message-ID: <20050706015555.GA3301@gothmog.gr> References: <42CB29E4.8090203@vicor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42CB29E4.8090203@vicor.com> Cc: gshapiro@freebsd.org, freebsd-questions@freebsd.org Subject: Re: aaaargghh.. sendmail again 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, 06 Jul 2005 01:56:07 -0000 On 2005-07-05 17:46, Julian Elischer wrote: > > N machines on a "ficticious net "fred.com" (not the real name). > > neet to get email out to the real world. via connected server > mailgate.real.domain. (ficticious name) > > They pass it forward to a server on their net "server.ficticious.net" > which uses the "Smarthost" option in Sendmail to > forward them on to mailgate.real.domain, > however mailgaet will not accept the mail unless the "sender" > resolves to something real. I have no control over that machine. > > I am trying to alter the sendmail config on server.ficticious.net > so that it rewrites the sender (both envelope and header) > to be from mumble@registered.domain. > > the sendmail m4 config file now has: > divert(0) > VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.17 2002/11/14 03:21:18 keramida Exp $') > OSTYPE(freebsd4) > DOMAIN(generic) > > FEATURE(access_db, `hash -o -T /etc/mail/access') > FEATURE(blacklist_recipients) > FEATURE(local_lmtp) > FEATURE(mailertable, `hash -o /etc/mail/mailertable') > FEATURE(virtusertable, `hash -o /etc/mail/virtusertable') > FEATURE(genericstable, `hash -o /etc/mail/senders.db') > > FEATURE(masquerade_entire_domain) > FEATURE(local_no_masquerade) > FEATURE(masquerade_envelope) > > define(`SMART_HOST', `mailgate.vicor-nb.com') > > MASQUERADE_AS(`registered.domain') > MASQUERADE_DOMAIN(`ficticious.net') > MASQUERADE_DOMAIN(`server.ficticious.net') > where /etc/mail/senders.db > contains: the 'has' version of: > > root jre@registered.domain > root@server.ficticious.net jre2@registered.domain > So, by 2 different methods I'm trying to get the mail to say its > coming from registered.domain but it isn't doing it, leaving it as > comig from server.ficticious.net Hi Julian, Have you also tried sending email from a non-root account? The root user is "exposed" by default in Sendmail. This means that the root user will *NOT* be masqueraded or remapped through genericstable. You can see that the root user is exposed by looking at the {E} class: gothmog:/etc/mail# grep '{E}' sendmail.cf C{E}root Try sending email from a different local user or remove the root user from the {E} class (by manually editing sendmail.cf and restarting Sendmail).